diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-12-24 09:21:59 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-12-24 09:21:59 +0000 |
commit | daf6a951136ebec9ca194925bf36eb722431ab84 (patch) | |
tree | 4cf3e02ab3e17c0aaca90803ddf2355f30880be6 /perl-install/install_any.pm | |
parent | 57d50655dc1eff2bd526069df882199b5f8df2c8 (diff) | |
download | drakx-backup-do-not-use-daf6a951136ebec9ca194925bf36eb722431ab84.tar drakx-backup-do-not-use-daf6a951136ebec9ca194925bf36eb722431ab84.tar.gz drakx-backup-do-not-use-daf6a951136ebec9ca194925bf36eb722431ab84.tar.bz2 drakx-backup-do-not-use-daf6a951136ebec9ca194925bf36eb722431ab84.tar.xz drakx-backup-do-not-use-daf6a951136ebec9ca194925bf36eb722431ab84.zip |
differentiate compssUsers flags from non-user modifiable flags (eg: hardware flags)
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r-- | perl-install/install_any.pm | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 5e163c409..dd1ddb0dc 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -639,11 +639,7 @@ sub setPackages { } sub setDefaultPackages { - my ($o, $b_clean) = @_; - - if ($b_clean) { - delete $o->{default_packages}; #- clean modified variables. - } + my ($o) = @_; push @{$o->{default_packages}}, "brltty" if cat_("/proc/cmdline") =~ /brltty=/; push @{$o->{default_packages}}, "nfs-utils-clients" if $o->{method} eq "nfs"; @@ -664,21 +660,21 @@ sub setDefaultPackages { push @{$o->{default_packages}}, uniq(grep { $_ } map { fs::format::package_needed_for_partition_type($_) } @{$o->{fstab}}); #- if no cleaning needed, populate by default, clean is used for second or more call to this function. - unless ($b_clean) { - if ($::auto_install && ($o->{rpmsrate_flags_chosen} || {})->{ALL}) { - $o->{rpmsrate_flags_chosen}{$_} = 1 foreach map { @{$_->{flags}} } @{$o->{compssUsers}}; + { + if ($::auto_install && ($o->{rpmsrate_flags_chosen} || {})->{CAT_ALL}) { + $o->{rpmsrate_flags_chosen}{"CAT_$_"} = 1 foreach map { @{$_->{flags}} } @{$o->{compssUsers}}; } if (!$o->{rpmsrate_flags_chosen} && !$o->{isUpgrade}) { #- use default selection seen in compssUsers directly. foreach (@{$o->{compssUsers}}) { $_->{selected} = $_->{default_selected} or next; - $o->{rpmsrate_flags_chosen}{$_} = 1 foreach @{$_->{flags}}; + $o->{rpmsrate_flags_chosen}{"CAT_$_"} = 1 foreach @{$_->{flags}}; } } } $o->{rpmsrate_flags_chosen}{uc($_)} = 1 foreach grep { modules::probe_category("multimedia/$_") } modules::sub_categories('multimedia'); $o->{rpmsrate_flags_chosen}{uc($_)} = 1 foreach map { $_->{driver} =~ /Flag:(.*)/ } detect_devices::probeall(); - $o->{rpmsrate_flags_chosen}{SYSTEM} = 1; + $o->{rpmsrate_flags_chosen}{CAT_SYSTEM} = 1; $o->{rpmsrate_flags_chosen}{DOCS} = !$o->{excludedocs}; $o->{rpmsrate_flags_chosen}{UTF8} = $o->{locale}{utf8}; $o->{rpmsrate_flags_chosen}{BURNER} = 1 if detect_devices::burners(); @@ -1200,9 +1196,18 @@ sub loadO { } } } + #- {rpmsrate_flags_chosen} was called {compssUsersChoice} if (my $rpmsrate_flags_chosen = delete $o->{compssUsersChoice}) { $o->{rpmsrate_flags_chosen} = $rpmsrate_flags_chosen; } + #- compssUsers flags are now named CAT_XXX + if ($o->{rpmsrate_flags_chosen} && + ! any { /^CAT_/ } keys %{$o->{rpmsrate_flags_chosen}}) { + #- we don't really know if this is needed for compatibility, but it won't hurt :) + foreach (keys %{$o->{rpmsrate_flags_chosen}}) { + $o->{rpmsrate_flags_chosen}{"CAT_$_"} = $o->{rpmsrate_flags_chosen}{$_}; + } + } $o; } |