summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_interactive.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-01-24 12:48:51 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-01-24 12:48:51 +0000
commitd3f8e92b341f4a2ddc15405358071cc99dc6eb73 (patch)
tree8fa39868a9ca6a6b45dd74083f0af16703849c93 /perl-install/install_steps_interactive.pm
parent8f687e57efcee4ff7e4161855f0cded5a64739b0 (diff)
downloaddrakx-backup-do-not-use-d3f8e92b341f4a2ddc15405358071cc99dc6eb73.tar
drakx-backup-do-not-use-d3f8e92b341f4a2ddc15405358071cc99dc6eb73.tar.gz
drakx-backup-do-not-use-d3f8e92b341f4a2ddc15405358071cc99dc6eb73.tar.bz2
drakx-backup-do-not-use-d3f8e92b341f4a2ddc15405358071cc99dc6eb73.tar.xz
drakx-backup-do-not-use-d3f8e92b341f4a2ddc15405358071cc99dc6eb73.zip
minimal install now handles excludedocs
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);
}