diff options
author | Francois Pons <fpons@mandriva.com> | 2001-07-25 09:59:05 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2001-07-25 09:59:05 +0000 |
commit | bf4c65a3884393d70173dc39e6bd48dfe1f64c66 (patch) | |
tree | b427e42fca9a6a735f140eabf110eff870e4fa0a | |
parent | 31697b3f1254a062ab5e09bea7332205df5bfbc7 (diff) | |
download | urpmi-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.pm | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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}); |