summaryrefslogtreecommitdiffstats
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
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
-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);
}