summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_gtk.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-09-29 14:19:51 +0000
committerFrancois Pons <fpons@mandriva.com>2003-09-29 14:19:51 +0000
commit21277f0dfc11354bd91fe1bf279715110b2c0ae8 (patch)
treef1eeb70842b3df9da8b0bd1a53e7e45a91efbae5 /perl-install/install_steps_gtk.pm
parentb5bc676d61e1e5f1f1840e8723f81dc24c344f98 (diff)
downloaddrakx-21277f0dfc11354bd91fe1bf279715110b2c0ae8.tar
drakx-21277f0dfc11354bd91fe1bf279715110b2c0ae8.tar.gz
drakx-21277f0dfc11354bd91fe1bf279715110b2c0ae8.tar.bz2
drakx-21277f0dfc11354bd91fe1bf279715110b2c0ae8.tar.xz
drakx-21277f0dfc11354bd91fe1bf279715110b2c0ae8.zip
add reason of package not selected (or unselected).
Diffstat (limited to 'perl-install/install_steps_gtk.pm')
-rw-r--r--perl-install/install_steps_gtk.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 07b654c16..a732bb306 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -348,9 +348,11 @@ sub choosePackagesTree {
my @n = map { pkgs::packageByName($packages, $_) } @_;
my %l;
my $isSelection = !$n[0]->flag_selected;
+ my $i = 0;
foreach (@n) {
#pkgs::togglePackageSelection($packages, $_, my $l = {});
#@l{grep {$l->{$_}} keys %$l} = ();
+ $i++; log::l("$i:toggle of $_");
pkgs::togglePackageSelection($packages, $_, \%l);
}
if (my @l = map { $packages->{depslist}[$_]->name } keys %l) {
@@ -380,6 +382,21 @@ sub choosePackagesTree {
}
} else {
$o->ask_warn('', N("You can't select/unselect this package"));
+ my @ask_unselect = grep { $packages->{state}{rejected}{$_}{backtrack} }
+ keys %{$packages->{state}{rejected} || {}};
+ my @l = map { my $rb = $packages->{state}->{rejected}{$_}{backtrack};
+ my @froms = keys %{$rb->{closure} || {}};
+ my @unsatisfied = @{$rb->{unsatisfied} || []};
+ my $s = join ", ", ((map { sprintf("due to missing %s", $_) } @froms),
+ (map { sprintf("due to unsatisfied %s", $_) } @unsatisfied),
+ $rb->{promote} && !$rb->{keep} ? sprintf("trying to promote %s", join(", ", @{$rb->{promote}})) : @{[]},
+ $rb->{keep} ? sprintf("in order to keep %s", join(", ", @{$rb->{keep}})) : @{[]},
+ );
+ $_ . ($s ? " ($s)" : '');
+ } sort @ask_unselect;
+
+ @ask_unselect and log::l("package cannot be selected or unselected for the following reason:",
+ map { "\n $_" } @l);
}
},
grep_allowed_to_toggle => sub {