diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2006-11-09 21:16:32 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2006-11-09 21:16:32 +0000 |
commit | 2c4a184166d2d21918b4003deb7f099c22932014 (patch) | |
tree | 0ee017388abeeea07e75b14d1a6e6db24c84d187 | |
parent | eaa935f2f35dc566d7026165dd62dbf9cd2539a3 (diff) | |
download | urpmi-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.pm | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; |