summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-07-25 09:59:05 +0000
committerFrancois Pons <fpons@mandriva.com>2001-07-25 09:59:05 +0000
commitbf4c65a3884393d70173dc39e6bd48dfe1f64c66 (patch)
treeb427e42fca9a6a735f140eabf110eff870e4fa0a
parent31697b3f1254a062ab5e09bea7332205df5bfbc7 (diff)
downloadurpmi-bf4c65a3884393d70173dc39e6bd48dfe1f64c66.tar
urpmi-bf4c65a3884393d70173dc39e6bd48dfe1f64c66.tar.gz
urpmi-bf4c65a3884393d70173dc39e6bd48dfe1f64c66.tar.bz2
urpmi-bf4c65a3884393d70173dc39e6bd48dfe1f64c66.tar.xz
urpmi-bf4c65a3884393d70173dc39e6bd48dfe1f64c66.zip
fixed finding package to upgrades, and code cleanup in compute_closure.
-rw-r--r--urpm.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/urpm.pm b/urpm.pm
index 0bc7499b..ed10f8f6 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -1064,8 +1064,8 @@ sub compute_closure {
foreach ($id, split ' ', $urpm->{params}{depslist}[$id]{deps}) {
if (/\|/) {
my ($follow_id, @upgradable_choices, %choices_id);
- @choices_id{map { $urpm->{params}{depslist}[$_]{id} } split /\|/, $_} = undef;
- my @choices = keys(%choices_id);
+ @choices_id{grep { defined $_ } map { $urpm->{params}{depslist}[$_]{id} } split /\|/, $_} = ();
+ my @choices = sort { $a <=> $b } keys(%choices_id);
foreach (@choices) {
$installed && $installed->{$_} and $follow_id = -1, last;
exists $packages->{$_} && ! ref $packages->{$_} and $follow_id = $_, last;
@@ -1725,7 +1725,7 @@ sub select_packages_to_upgrade {
rpmtools::db_traverse($db, [ qw(name version release serial files) ], sub {
my ($p) = @_;
my $otherPackage = $p->{release} !~ /mdk\w*$/ && "$p->{name}-$p->{version}-$p->{release}";
- my $pkg = $urpm->{params}{info}{$p->{name}};
+ my $pkg = $urpm->{params}{names}{$p->{name}};
if ($pkg) {
my $version_cmp = rpmtools::version_compare($p->{version}, $pkg->{version});