aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Rpmdrake/pkg.pm19
1 files changed, 7 insertions, 12 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 0bf3dcef..10d7fe2f 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -353,7 +353,7 @@ our $need_restart;
our $probe_only_for_updates;
sub get_updates_list {
- my ($urpm, $db, $state, $requested, $requested_list, $requested_strict) = @_;
+ my ($urpm, $db, $state, $requested, $requested_list, $requested_strict, $all_pkgs) = @_;
$urpm->request_packages_to_upgrade(
$db,
@@ -373,7 +373,11 @@ sub get_updates_list {
}
# list of updates (including those matching /etc/urpmi/skip.list):
- @$requested_list = sort map { urpm_name($_) } @{$urpm->{depslist}}[keys %$requested];
+ @$requested_list = sort map {
+ my $name = urpm_name($_);
+ $all_pkgs->{$name} = { pkg => $_ };
+ $name;
+ } @{$urpm->{depslist}}[keys %$requested];
# list of pure updates (w/o those matching /etc/urpmi/skip.list but with their deps):
if ($probe_only_for_updates && !$need_restart) {
@@ -475,7 +479,7 @@ sub get_pkgs {
my (@requested, @requested_strict);
if ($::rpmdrake_options{compute_updates} || $::MODE eq 'update') {
- get_updates_list($urpm, $db, $state, $requested, \@requested, \@requested_strict);
+ get_updates_list($urpm, $db, $state, $requested, \@requested, \@requested_strict, \%all_pkgs);
}
$priority_state = $need_restart ? $state : undef;
@@ -510,15 +514,6 @@ sub get_pkgs {
$all_pkgs{$name} = { pkg => $pkg };
}
}
- foreach my $medium (@update_medias) {
- update_pbar($gurpm);
- foreach my $pkg_id ($medium->{start} .. $medium->{end}) {
- my $pkg = $urpm->{depslist}[$pkg_id];
- $pkg->flag_upgrade or next;
- my $name = urpm_name($pkg);
- $all_pkgs{$name} = { pkg => $pkg };
- }
- }
@updates = @requested;
# selecting updates by default but skipped ones (MandrivaUpdate only):
foreach (@requested_strict) {