summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-09 21:16:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-09 21:16:32 +0000
commit2c4a184166d2d21918b4003deb7f099c22932014 (patch)
tree0ee017388abeeea07e75b14d1a6e6db24c84d187
parenteaa935f2f35dc566d7026165dd62dbf9cd2539a3 (diff)
downloadurpmi-2c4a184166d2d21918b4003deb7f099c22932014.tar
urpmi-2c4a184166d2d21918b4003deb7f099c22932014.tar.gz
urpmi-2c4a184166d2d21918b4003deb7f099c22932014.tar.bz2
urpmi-2c4a184166d2d21918b4003deb7f099c22932014.tar.xz
urpmi-2c4a184166d2d21918b4003deb7f099c22932014.zip
make things more explicit (it helps perl_checker)
-rw-r--r--urpm.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/urpm.pm b/urpm.pm
index a1ab7295..7600bcaf 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -3146,7 +3146,8 @@ sub find_packages_to_remove {
if (($n) = /^(.*)-[^\-]*-[^\-]*$/) {
$db->traverse_tag('name', [ $n ], sub {
my ($p) = @_;
- join('-', ($p->fullname)[0..2]) eq $_ or return;
+ my ($name, $version, $release) = $p->fullname;
+ "$name-$version-$release" eq $_ or return;
$urpm->resolve_rejected($db, $state, $p, removed => 1, bundle => $options{bundle});
push @m, scalar $p->fullname;
$found = 1;
@@ -3158,7 +3159,8 @@ sub find_packages_to_remove {
if (($n) = /^(.*)-[^\-]*$/) {
$db->traverse_tag('name', [ $n ], sub {
my ($p) = @_;
- join('-', ($p->fullname)[0..1]) eq $_ or return;
+ my ($name, $version) = $p->fullname;
+ "$name-$version" eq $_ or return;
$urpm->resolve_rejected($db, $state, $p, removed => 1, bundle => $options{bundle});
push @m, scalar $p->fullname;
$found = 1;