From 76b5d2e2a32fc371714ba421fac9d345c7807341 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 18 Feb 2004 10:36:59 +0000 Subject: small cleanup --- perl-install/install_steps_gtk.pm | 4 ++-- 1 file 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, -- cgit v1.2.1