summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-06-28 20:58:59 +0000
committerThierry Vignaud <tv@mageia.org>2012-06-28 20:58:59 +0000
commit2a4b466fd8518a62afe7a1b11fe26f788b08bc2a (patch)
treee983d94d5c438678cb79617a3869152ebe1d16a6 /urpm
parentb4175d2112859ff01598c2e5fa2556a2bdc26bdd (diff)
downloadurpmi-2a4b466fd8518a62afe7a1b11fe26f788b08bc2a.tar
urpmi-2a4b466fd8518a62afe7a1b11fe26f788b08bc2a.tar.gz
urpmi-2a4b466fd8518a62afe7a1b11fe26f788b08bc2a.tar.bz2
urpmi-2a4b466fd8518a62afe7a1b11fe26f788b08bc2a.tar.xz
urpmi-2a4b466fd8518a62afe7a1b11fe26f788b08bc2a.zip
(find_packages_to_remove) simplify
(needs URPM >= 4.10)
Diffstat (limited to 'urpm')
-rw-r--r--urpm/select.pm41
1 files changed, 1 insertions, 40 deletions
diff --git a/urpm/select.pm b/urpm/select.pm
index 9c5a95ce..d79785b1 100644
--- a/urpm/select.pm
+++ b/urpm/select.pm
@@ -408,46 +408,7 @@ sub find_packages_to_remove {
foreach (@$l) {
my ($n, $found);
- #- check if name-version-release.architecture was given.
- if (($n) = $_ =~ $fullname2name_re) {
- $db->traverse_tag('name', [ $n ], sub {
- my ($p) = @_;
- $p->fullname eq $_ or return;
- $urpm->resolve_rejected($db, $state, $p, removed => 1);
- push @m, scalar $p->fullname;
- $found = 1;
- });
- $found and next;
- }
-
- #- check if name-version-release was given.
- if (($n) = /^(.*)-[^\-]*-[^\-]*$/) {
- $db->traverse_tag('name', [ $n ], sub {
- my ($p) = @_;
- my ($name, $version, $release) = $p->fullname;
- "$name-$version-$release" eq $_ or return;
- $urpm->resolve_rejected($db, $state, $p, removed => 1);
- push @m, scalar $p->fullname;
- $found = 1;
- });
- $found and next;
- }
-
- #- check if name-version was given.
- if (($n) = /^(.*)-[^\-]*$/) {
- $db->traverse_tag('name', [ $n ], sub {
- my ($p) = @_;
- my ($name, $version) = $p->fullname;
- "$name-$version" eq $_ or return;
- $urpm->resolve_rejected($db, $state, $p, removed => 1);
- push @m, scalar $p->fullname;
- $found = 1;
- });
- $found and next;
- }
-
- #- check if only name was given.
- $db->traverse_tag('name', [ $_ ], sub {
+ $db->traverse_tag('nvra', [ $_ ], sub {
my ($p) = @_;
$urpm->resolve_rejected($db, $state, $p, removed => 1);
push @m, scalar $p->fullname;