summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_interactive.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install_steps_interactive.pm')
-rw-r--r--perl-install/install_steps_interactive.pm39
1 files changed, 19 insertions, 20 deletions
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);
}