aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xMandrivaUpdate9
-rwxr-xr-xRpmdrake/pkg.pm8
2 files changed, 9 insertions, 8 deletions
diff --git a/MandrivaUpdate b/MandrivaUpdate
index 4c0582e3..a3bbd069 100755
--- a/MandrivaUpdate
+++ b/MandrivaUpdate
@@ -122,20 +122,17 @@ gtknew('ScrolledWindow', width => $typical_width*0.9,
pkgs_provider({}, $default_list_mode); # default mode
# select packages to update:
- my @requested = $urpm->resolve_requested($db, $urpm->{state},
- { map { $pkgs->{$_}{pkg}->id => 1 } keys %$pkgs },
- callback_choices => \&callback_choices,
- );
+ my @requested = sort keys %$pkgs;
# don't select kernel*-latest by default:
- foreach my $name (sort(map { urpm_name($_) } @requested)) {
+ foreach my $name (@requested) {
$pkgs->{$name}{selected} = to_bool($name !~ /^kernel.*-latest/);
$pkgs->{$name}{pkg}->set_flag_required($name !~ /^kernel.*-latest/);
};
@{$list->{data}} = map {
[ $pkgs->{$_}{selected}, join("\n", "<b>$_</b>", translate(rpm_summary($pkgs->{$_}{pkg}->summary))) ]
- } sort map { urpm_name($_) } @requested;
+ } grep { $pkgs->{$_}{pkg} } @requested;
my $cell = ($list->get_column(0)->get_cell_renderers)[0];
$cell->signal_connect (toggled => sub {
my ($cell, $text_path) = @_;
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index f5e83ff6..807bd6d4 100755
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -371,6 +371,10 @@ Then, restart %s.", $rpmdrake::myname_update)), myexit(-1);
start => 0,
end => $#{$urpm->{depslist}},
);
+ my @requested = $probe_only_for_updates ?
+ sort map { urpm_name($_) } $urpm->resolve_requested($db, $state, $requested, callback_choices => \&callback_choices)
+ : sort map { urpm_name($_) } @{$urpm->{depslist}}[keys %$requested];
+
if (!$probe_only_for_updates) {
$urpm->compute_installed_flags($db); # TODO/FIXME: not for updates
$urpm->{depslist}[$_]->set_flag_installed foreach keys %$requested; #- pretend it's installed
@@ -387,8 +391,8 @@ Then, restart %s.", $rpmdrake::myname_update)), myexit(-1);
$pkg->flag_upgrade or next;
my $selected = 0;
- if (member(pkg2medium($pkg, $urpm)->{name}, @updates_media_names) && $pkg->flag_installed) { # TODO/FIXME: for updates
- any { $pkg->id >= $_->{start} && $pkg->id <= $_->{end} } @update_medias or next;
+ if (member(urpm_name($pkg), @requested)) {
+ #any { $pkg->id >= $_->{start} && $pkg->id <= $_->{end} } @update_medias or next;
if ($::options{'pkg-sel'} || $::options{'pkg-nosel'}) {
my $n = urpm_name($pkg);
$pkg_sel{$n} || $pkg_nosel{$n} or next;