summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-01-09 12:56:18 +0000
committerFrancois Pons <fpons@mandriva.com>2002-01-09 12:56:18 +0000
commit2d4064be7e621ea2ce15e1e00a481631bc6106cf (patch)
tree9ff0cef84ee4f76f3fb704e0b214d96e652961b8 /perl-install/install_any.pm
parent28a0d63aa74d1e3f4b17e53ef7e5c9289993e2dc (diff)
downloaddrakx-2d4064be7e621ea2ce15e1e00a481631bc6106cf.tar
drakx-2d4064be7e621ea2ce15e1e00a481631bc6106cf.tar.gz
drakx-2d4064be7e621ea2ce15e1e00a481631bc6106cf.tar.bz2
drakx-2d4064be7e621ea2ce15e1e00a481631bc6106cf.tar.xz
drakx-2d4064be7e621ea2ce15e1e00a481631bc6106cf.zip
fixed too many package selected for No X or With X option of minimal installation.
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm25
1 files changed, 15 insertions, 10 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 7e586caec..224bdfdcc 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -354,9 +354,11 @@ sub setPackages {
}
sub setDefaultPackages {
- my ($o) = @_;
+ my ($o, $clean) = @_;
- delete $o->{$_} foreach qw(default_packages compssUsersChoice); #- clean modified variables.
+ if ($clean) {
+ delete $o->{$_} foreach qw(default_packages compssUsersChoice); #- clean modified variables.
+ }
push @{$o->{default_packages}}, "nfs-utils-clients" if $o->{method} eq "nfs";
push @{$o->{default_packages}}, "numlock" if $o->{miscellaneous}{numlock};
@@ -372,14 +374,17 @@ sub setDefaultPackages {
push @{$o->{default_packages}}, "alsa", "alsa-utils" if modules::get_alias("sound-slot-0") =~ /^snd-card-/;
push @{$o->{default_packages}}, "imwheel" if $o->{mouse}{nbuttons} > 3;
- if ($::auto_install && $o->{compssUsersChoice}{ALL}) {
- $o->{compssUsersChoice}{$_} = 1 foreach map { @{$o->{compssUsers}{$_}{flags}} } @{$o->{compssUsersSorted}};
- }
- if (!$o->{compssUsersChoice} && !$o->{isUpgrade}) {
- #- by default, choose:
- $o->{compssUsersChoice}{$_} = 1 foreach 'GNOME', 'KDE', 'CONFIG', 'X';
- $o->{compssUsersChoice}{$_} = 1
- foreach map { @{$o->{compssUsers}{$_}{flags}} } 'Workstation|Office Workstation', 'Workstation|Internet station';
+ #- if no cleaning needed, populate by default, clean is used for second or more call to this function.
+ unless ($clean) {
+ if ($::auto_install && $o->{compssUsersChoice}{ALL}) {
+ $o->{compssUsersChoice}{$_} = 1 foreach map { @{$o->{compssUsers}{$_}{flags}} } @{$o->{compssUsersSorted}};
+ }
+ if (!$o->{compssUsersChoice} && !$o->{isUpgrade}) {
+ #- by default, choose:
+ $o->{compssUsersChoice}{$_} = 1 foreach 'GNOME', 'KDE', 'CONFIG', 'X';
+ $o->{compssUsersChoice}{$_} = 1
+ foreach map { @{$o->{compssUsers}{$_}{flags}} } 'Workstation|Office Workstation', 'Workstation|Internet station';
+ }
}
$o->{compssUsersChoice}{uc($_)} = 1 foreach grep { modules::get_that_type($_) } ('tv', 'scanner', 'photo', 'sound');
$o->{compssUsersChoice}{uc($_)} = 1 foreach map { $_->{driver} =~ /Flag:(.*)/ } detect_devices::probeall();