summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install2.pm2
-rw-r--r--perl-install/install_steps.pm2
-rw-r--r--perl-install/install_steps_interactive.pm39
3 files changed, 21 insertions, 22 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index c7c4af97e..f98da39e3 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -187,8 +187,6 @@ sub formatPartitions {
common::screenshot_dir__and_move();
- substInFile { s/%_excludedocs.*//; $_ .= "%_excludedocs yes\n" if eof && $o->{excludedocs} } "$o->{prefix}/etc/rpm/macros";
-
any::rotate_logs($o->{prefix});
require raid;
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index c6c668bbb..c6b80f4a7 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -294,6 +294,8 @@ sub beforeInstallPackages {
require network;
network::add2hosts("$o->{prefix}/etc/hosts", "localhost.localdomain", "127.0.0.1");
+
+ substInFile { s/%_excludedocs.*//; $_ .= "%_excludedocs yes\n" if eof && $o->{excludedocs} } "$o->{prefix}/etc/rpm/macros";
}
sub pkg_install {
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);
}