diff options
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | urpm/select.pm | 41 |
2 files changed, 3 insertions, 40 deletions
@@ -1,3 +1,5 @@ +- urpme: simplify traversing DB (needs URPM >= 4.10) + Version 7.1 - 13 June 2012 - adapt to URPM-4.2 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; |