summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-02-18 10:36:59 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-02-18 10:36:59 +0000
commit76b5d2e2a32fc371714ba421fac9d345c7807341 (patch)
tree1652079f5b7ba147b159711d823c0240f613203b
parentba779bc24b8daff2653ca86313d221fa81b0ddba (diff)
downloaddrakx-backup-do-not-use-76b5d2e2a32fc371714ba421fac9d345c7807341.tar
drakx-backup-do-not-use-76b5d2e2a32fc371714ba421fac9d345c7807341.tar.gz
drakx-backup-do-not-use-76b5d2e2a32fc371714ba421fac9d345c7807341.tar.bz2
drakx-backup-do-not-use-76b5d2e2a32fc371714ba421fac9d345c7807341.tar.xz
drakx-backup-do-not-use-76b5d2e2a32fc371714ba421fac9d345c7807341.zip
small cleanup
-rw-r--r--perl-install/install_steps_gtk.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index caf15f3cd..56be22ca5 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -346,7 +346,7 @@ sub choosePackagesTree {
my $set_state = shift @_;
my $isSelection = 0;
my %l = map { my $p = pkgs::packageByName($packages, $_);
- $p->flag_selected or ++$isSelection;
+ $isSelection ||= !$p->flag_selected;
$p->id => 1 } @_;
my $state = $packages->{state} ||= {};
my @l = $isSelection ? $packages->resolve_requested($packages->{rpmdb}, $state, \%l,
@@ -391,8 +391,8 @@ sub choosePackagesTree {
N("The following packages are going to be removed"),
formatList(20, sort(map { $_->name } @l)) ], 1) or $error = ''; #- defined
}
- $error and $o->ask_warn('', $error);
if (defined $error) {
+ $o->ask_warn('', $error) if $error;
#- disable selection (or unselection).
$isSelection ? $packages->disable_selected($packages->{rpmdb}, $state, @l) :
$packages->resolve_requested($packages->{rpmdb}, $state, \%l,