diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-03-20 17:02:57 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-03-20 17:02:57 +0000 |
commit | 23f9db1e651a6e2777decbfa8638d32178846bb2 (patch) | |
tree | 1770ccebabf473227c5ae6362fe6b5c270b514ce | |
parent | ef912e15b25151ef79173ba7bb7f06c1e17b4138 (diff) | |
download | drakx-23f9db1e651a6e2777decbfa8638d32178846bb2.tar drakx-23f9db1e651a6e2777decbfa8638d32178846bb2.tar.gz drakx-23f9db1e651a6e2777decbfa8638d32178846bb2.tar.bz2 drakx-23f9db1e651a6e2777decbfa8638d32178846bb2.tar.xz drakx-23f9db1e651a6e2777decbfa8638d32178846bb2.zip |
- create install_any::unselectMostPackages
- use it instead of pkgs::unselectAllPackages (otherwise default_packages ends up non-selected)
-rw-r--r-- | perl-install/install_any.pm | 6 | ||||
-rw-r--r-- | perl-install/install_steps.pm | 3 | ||||
-rw-r--r-- | perl-install/install_steps_interactive.pm | 4 |
3 files changed, 9 insertions, 4 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 61d4176e1..3868f3bba 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -354,6 +354,12 @@ sub setPackages { } } +sub unselectMostPackages { + my ($o) = @_; + pkgs::unselectAllPackages($o->{packages}); + pkgs::selectPackage($o->{packages}, pkgs::packageByName($o->{packages}, $_) || next) foreach @{$o->{default_packages}}; +} + sub addToBeDone(&$) { my ($f, $step) = @_; diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index ec8aa819b..1541ac61c 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -267,8 +267,7 @@ sub choosePackages { #- avoid destroying user selection of packages but only #- for expert, as they may have done individual selection before. if ($first_time || !$::expert) { - pkgs::unselectAllPackages($packages); - pkgs::selectPackage($o->{packages}, pkgs::packageByName($o->{packages}, $_) || next) foreach @{$o->{default_packages}}; + install_any::unselectMostPackages($o); unless ($::expert) { add2hash_($o, { compssListLevel => 5 }) unless $::auto_install; diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index b28a0f247..22a1fb074 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -525,7 +525,7 @@ sub chooseGroups { my ($o, $packages, $compssUsers, $min_level, $individual, $max_size) = @_; my $b = pkgs::saveSelected($packages); - pkgs::unselectAllPackages($packages); + install_any::unselectMostPackages($o); pkgs::setSelectedFromCompssList($packages, {}, $min_level, $max_size); my $system_size = pkgs::selectedSize($packages); my ($sizes, $pkgs) = pkgs::computeGroupSize($packages, $min_level); @@ -565,7 +565,7 @@ sub chooseGroups { my $size = $system_size + $compute_size->(map { @{$compssUsers->{$_}{flags}} } grep { $val{$_} } @groups); #- if a profile is deselected, deselect everything (easier than deselecting the profile packages) - $old_size > $size and pkgs::unselectAllPackages($packages); + $old_size > $size and install_any::unselectMostPackages($o); $old_size = $size; $size_text = _("Selected size %d%s", pkgs::correctSize($size / sqr(1024)), _("MB")); }; &$update_size; |