summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-03 12:45:24 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-03 12:45:24 +0000
commitd65770eee171b53272716aa5952ad9fd34b314d3 (patch)
tree5763db2380f22eff8651cf51f74ae1b0d81adf0a /urpm
parent7fbbff059f2f37f188165ab61266198e768a6154 (diff)
downloadurpmi-d65770eee171b53272716aa5952ad9fd34b314d3.tar
urpmi-d65770eee171b53272716aa5952ad9fd34b314d3.tar.gz
urpmi-d65770eee171b53272716aa5952ad9fd34b314d3.tar.bz2
urpmi-d65770eee171b53272716aa5952ad9fd34b314d3.tar.xz
urpmi-d65770eee171b53272716aa5952ad9fd34b314d3.zip
create a var
Diffstat (limited to 'urpm')
-rw-r--r--urpm/select.pm4
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;