diff options
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/select.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/urpm/select.pm b/urpm/select.pm index 6c3f4cb6..e9c61fdf 100644 --- a/urpm/select.pm +++ b/urpm/select.pm @@ -372,6 +372,8 @@ sub get_preferred { $best ? [$best] : [], [@prefer, @l]; } +my $fullname2name_re = qr/^(.*)-[^\-]*-[^\-]*\.[^\.\-]*$/; + #- find packages to remove. #- options: #- callback_base @@ -395,7 +397,7 @@ sub find_packages_to_remove { my ($n, $found); #- check if name-version-release.architecture was given. - if (($n) = /^(.*)-[^\-]*-[^\-]*\.[^\.\-]*$/) { + if (($n) = $_ =~ $fullname2name_re) { $db->traverse_tag('name', [ $n ], sub { my ($p) = @_; $p->fullname eq $_ or return; |