From d3f8e92b341f4a2ddc15405358071cc99dc6eb73 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 24 Jan 2002 12:48:51 +0000 Subject: minimal install now handles excludedocs --- perl-install/install_steps_interactive.pm | 39 +++++++++++++++---------------- 1 file changed, 19 insertions(+), 20 deletions(-) (limited to 'perl-install/install_steps_interactive.pm') diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index b742c0049..534550f1b 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -659,29 +659,28 @@ sub chooseGroups { #- if no group have been chosen, ask for using base system only, or no X, or normal. unless ($o->{isUpgrade} || grep { $val{$_} } keys %val) { - my $type = - $o->{compssUsersChoice}{X} ? 2 : - grep { $_ } values %{$o->{compssUsersChoice}} ? 1 : 0; - - my @choices = ( - _("Truly minimal install (especially no urpmi)"), - _("Base system (no X, including urpmi)"), - _("With X"), - ); - - #- ask user for its choice. - $type = $o->ask_from_listf(_("Type of install"), - _("You do not have selected any group of packages -Please choose the minimal installation you want"), - sub { $choices[$_[0]] }, [ 0 .. $#choices ], $type); - defined $type or return &chooseGroups; + my $docs = !$o->{excludedocs}; + my $minimal = !grep { $_ } values %{$o->{compssUsersChoice}}; + + $o->ask_from(_("Type of install"), + _("You do not have selected any group of packages +Please choose the minimal installation you want"), + [ + { val => \$o->{compssUsersChoice}{X}, type => 'bool', text => _("With X"), disabled => sub { $minimal } }, + if_($::expert || $minimal, + { val => \$docs, type => 'bool', text => _("With basic documentation (recommended!)"), disabled => sub { $minimal } }, + { val => \$minimal, type => 'bool', text => _("Truly minimal install (especially no urpmi)") }, + ), + ], + ) or return &chooseGroups; + + $o->{excludedocs} = !$docs || $minimal; #- reselect according to user selection. - if ($type) { - install_any::setDefaultPackages($o, 'clean'); - $o->{compssUsersChoice}{X} = $type == 2; - } else { + if ($minimal) { $o->{compssUsersChoice}{$_} = 0 foreach keys %{$o->{compssUsersChoice}}; + } else { + install_any::setDefaultPackages($o, 'clean'); } install_any::unselectMostPackages($o); } -- cgit v1.2.1