From 13ac5c963e1715979ef7b1a055e947def5135873 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Mon, 15 Jul 2002 17:54:50 +0000 Subject: fixed flag usage (still check selected package to upgrade but already selected are correctly shown). --- perl-install/install_steps_gtk.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index 0253cdf07..5cfb557d2 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -348,9 +348,9 @@ sub choosePackagesTree { node_state => sub { my $p = pkgs::packageByName($packages,$_[0]) or return; pkgs::packageMedium($packages, $p)->{selected} or return; - $p->flag_base and return 'base'; - $p->flag_installed and return 'installed'; - $p->flag_selected and return 'selected'; + $p->flag_base and return 'base'; + $p->flag_installed && !$p->flag_upgrade and return 'installed'; + $p->flag_selected and return 'selected'; return 'unselected'; }, build_tree => sub { @@ -442,7 +442,7 @@ sub choosePackagesTree { my $p = pkgs::packageByName($packages, $_[0]) or return; if ($p->flag_base) { $o->ask_warn('', _("This is a mandatory package, it can't be unselected")); - } elsif ($p->flag_installed) { + } elsif ($p->flag_installed && !$p->flag_upgrade) { $o->ask_warn('', _("You can't unselect this package. It is already installed")); } elsif ($p->flag_selected && $p->flag_installed) { if ($::expert) { -- cgit v1.2.1