diff options
-rw-r--r-- | perl-install/ChangeLog | 7 | ||||
-rw-r--r-- | perl-install/install_steps_interactive.pm | 80 | ||||
-rw-r--r-- | perl-install/share/compssList | 14 |
3 files changed, 61 insertions, 40 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog index 1c5bef415..339cae985 100644 --- a/perl-install/ChangeLog +++ b/perl-install/ChangeLog @@ -1,3 +1,10 @@ +2000-10-08 Pixel <pixel@mandrakesoft.com> + + * install_steps_interactive.pm (choosePackages): move the + computing of max_size before calling chooseGroups (not the one for + desktop meta_class) + (chooseGroups): compute the size of Miscellaneous + 2000-10-07 DrakX <install@linux-mandrake.com> * snapshot uploaded diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 848b8c11c..a0a70e4a0 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -432,49 +432,44 @@ sub choosePackages { my $min_size = pkgs::selectedSize($packages); $min_size < $availableC or die _("Your system has not enough space left for installation or upgrade (%d > %d)", $min_size, $availableC); - $o->chooseGroups($packages, $compssUsers, \$individual) unless $::beginner || $::corporate; + my $min_mark = $::beginner ? 25 : $::expert ? 0 : 1; - #- avoid reselection of package if individual selection is requested and this is not the first time. - if (1 || $first_time || !$individual) { - my $min_mark = $::beginner ? 25 : $::expert ? 0 : 1; + my $b = pkgs::saveSelected($packages); + my (undef, $level) = pkgs::setSelectedFromCompssList($o->{compssListLevels}, $packages, $min_mark, 0, $o->{installClass}); + my $max_size = pkgs::selectedSize($packages) + 1; #- avoid division by zero. + pkgs::restoreSelected($b); - my $b = pkgs::saveSelected($packages); - my (undef, $level) = pkgs::setSelectedFromCompssList($o->{compssListLevels}, $packages, $min_mark, 0, $o->{installClass}); - my $size = pkgs::selectedSize($packages); - pkgs::restoreSelected($b); + $o->chooseGroups($packages, $compssUsers, \$individual, $max_size) unless $::beginner || $::corporate; - my $max_size = 1 + $size; #- avoid division by zero. + my $size2install = min($availableC, do { + my $max = round_up(min($max_size, $availableC) / sqr(1024), 100); - my $size2install = min($availableC, do { - my $max = round_up(min($max_size, $availableC) / sqr(1024), 100); - - if ($::beginner) { - my (@l); - my @text = (__("Minimum (%dMB)"), __("Recommended (%dMB)"), __("Complete (%dMB)")); - if ($o->{meta_class} eq 'desktop') { - @l = (300, 500, 800, 0); - $max > $l[2] or splice(@l, 2, 1); - $max > $l[1] or splice(@l, 1, 1); - $max > $l[0] or @l = $max; - $text[$#l] = __("Custom"); - } else { - @l = (300, 700, $max); - $l[2] > $l[1] + 200 or splice(@l, 1, 1); #- not worth proposing too alike stuff - $l[1] > $l[0] + 100 or splice(@l, 0, 1); - } - $o->set_help('empty'); - $o->ask_from_listf('', _("Select the size you want to install"), sub { _ ($text[$_[1]], $_[0]) }, \@l, $l[1]) * sqr(1024); + if ($::beginner) { + my (@l); + my @text = (__("Minimum (%dMB)"), __("Recommended (%dMB)"), __("Complete (%dMB)")); + if ($o->{meta_class} eq 'desktop') { + @l = (300, 500, 800, 0); + $max > $l[2] or splice(@l, 2, 1); + $max > $l[1] or splice(@l, 1, 1); + $max > $l[0] or @l = $max; + $text[$#l] = __("Custom"); } else { - $o->chooseSizeToInstall($packages, $min_size, $max_size, $availableC, $individual) || goto &choosePackages; + @l = (300, 700, $max); + $l[2] > $l[1] + 200 or splice(@l, 1, 1); #- not worth proposing too alike stuff + $l[1] > $l[0] + 100 or splice(@l, 0, 1); } - }); - if (!$size2install) { #- special case for desktop - $o->chooseGroups($packages, $compssUsers) or goto &choosePackages; - $size2install = $availableC; + $o->set_help('empty'); + $o->ask_from_listf('', _("Select the size you want to install"), sub { _ ($text[$_[1]], $_[0]) }, \@l, $l[1]) * sqr(1024); + } else { + $o->chooseSizeToInstall($packages, $min_size, $max_size, $availableC, $individual) || goto &choosePackages; } - ($o->{packages_}{ind}) = - pkgs::setSelectedFromCompssList($o->{compssListLevels}, $packages, $min_mark, $size2install, $o->{installClass}); + }); + if (!$size2install) { #- special case for desktop + $o->chooseGroups($packages, $compssUsers) or goto &choosePackages; + $size2install = $availableC; } + ($o->{packages_}{ind}) = + pkgs::setSelectedFromCompssList($o->{compssListLevels}, $packages, $min_mark, $size2install, $o->{installClass}); $o->choosePackagesTree($packages, $compss) if $individual; } @@ -486,7 +481,7 @@ sub chooseSizeToInstall { sub choosePackagesTree {} sub chooseGroups { - my ($o, $packages, $compssUsers, $individual) = @_; + my ($o, $packages, $compssUsers, $individual, $max_size) = @_; my %size; my $base = pkgs::selectedSize($packages); @@ -496,7 +491,18 @@ sub chooseGroups { $size{$_} = pkgs::selectedSize($packages) - $base; pkgs::restoreSelected($b); } - my @groups = (@{$o->{compssUsersSorted}}, $o->{meta_class} eq 'desktop' ? () : __("Miscellaneous")); + + my @groups = @{$o->{compssUsersSorted}}; + if ($o->{meta_class} ne 'desktop') { + push @groups, __("Miscellaneous"); + + my $b = pkgs::saveSelected($packages); + foreach (@{$o->{compssUsersSorted}}) { + pkgs::selectPackage($packages, $_) foreach @{$compssUsers->{$_}}; + } + $size{Miscellaneous} = $max_size - pkgs::selectedSize($packages); + pkgs::restoreSelected($b); + } my $all; $o->ask_many_from_list('', _("Package Group Selection"), { list => \@groups, diff --git a/perl-install/share/compssList b/perl-install/share/compssList index fdb02c4fd..bc5a56cdf 100644 --- a/perl-install/share/compssList +++ b/perl-install/share/compssList @@ -886,8 +886,12 @@ man-pages-ru -10 -30 -25 man-pages-zh -10 -30 -25 mandrake-release 99 99 99 mandrake_desk 88 0 88 -mandrake_doc-en -15 0 -25 -mandrake_doc-fr -15 0 -25 +mandrake_doc-de -15 -90 -25 +mandrake_doc-en -15 -90 -25 +mandrake_doc-es -15 -90 -25 +mandrake_doc-fr -15 -90 -25 +mandrake_doc-it -15 -90 -25 +mandrake_doc-ru -15 -90 -25 mars-nwe 0 35 0 mathplot 30 0 20 mawk 0 25 80 @@ -964,8 +968,11 @@ netscape-common 0 0 0 netscape-communicator 78 60 73 netscape-euskara -13 -30 -18 netscape-francais -13 -30 -18 +netscape-japanese -13 -30 -18 netscape-navigator 0 0 0 +netscape-polish -13 -30 -18 netscape-russian -13 -30 -18 +netscape-spanish -13 -30 -18 netscape-walon -13 -30 -18 newt 10 0 75 newt-devel 10 0 75 @@ -1284,7 +1291,7 @@ tetex-doc 25 0 40 tetex-dvilj 40 0 40 tetex-dvips 25 0 40 tetex-latex 25 0 40 -tetex-latex-heb 0 0 0 +tetex-latex-heb -65 -90 -90 tetex-xdvi 25 0 50 texinfo 22 0 50 textutils 99 99 99 @@ -1483,6 +1490,7 @@ kde-i18n-British -12 -51 -23 kde-i18n-Bulgarian -12 -51 -23 kde-i18n-Catalan -12 -51 -23 kde-i18n-Chinese -12 -51 -23 +kde-i18n-Chinese-Big5 -12 -51 -23 kde-i18n-Croatian -12 -51 -23 kde-i18n-Czech -12 -51 -23 kde-i18n-Danish -12 -51 -23 |