summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_interactive.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-10-08 22:48:45 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-10-08 22:48:45 +0000
commit3a2974725a88f90678ca80ec5fed0cad8a7ae73f (patch)
tree78dc2f731d04199de3a78156562402cbc9066c44 /perl-install/install_steps_interactive.pm
parentb96eaf258df93474108357edc2473a76f630bd52 (diff)
downloaddrakx-3a2974725a88f90678ca80ec5fed0cad8a7ae73f.tar
drakx-3a2974725a88f90678ca80ec5fed0cad8a7ae73f.tar.gz
drakx-3a2974725a88f90678ca80ec5fed0cad8a7ae73f.tar.bz2
drakx-3a2974725a88f90678ca80ec5fed0cad8a7ae73f.tar.xz
drakx-3a2974725a88f90678ca80ec5fed0cad8a7ae73f.zip
no_comment
Diffstat (limited to 'perl-install/install_steps_interactive.pm')
-rw-r--r--perl-install/install_steps_interactive.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index a0a70e4a0..a3d24602e 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -435,11 +435,11 @@ sub choosePackages {
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 ($ind, $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);
- $o->chooseGroups($packages, $compssUsers, \$individual, $max_size) unless $::beginner || $::corporate;
+ $o->chooseGroups($packages, $compssUsers, $min_mark, $ind, \$individual, $max_size) unless $::beginner || $::corporate;
my $size2install = min($availableC, do {
my $max = round_up(min($max_size, $availableC) / sqr(1024), 100);
@@ -465,7 +465,7 @@ sub choosePackages {
}
});
if (!$size2install) { #- special case for desktop
- $o->chooseGroups($packages, $compssUsers) or goto &choosePackages;
+ $o->chooseGroups($packages, $compssUsers, $min_mark, $ind) or goto &choosePackages;
$size2install = $availableC;
}
($o->{packages_}{ind}) =
@@ -481,13 +481,13 @@ sub chooseSizeToInstall {
sub choosePackagesTree {}
sub chooseGroups {
- my ($o, $packages, $compssUsers, $individual, $max_size) = @_;
+ my ($o, $packages, $compssUsers, $min_level, $ind, $individual, $max_size) = @_;
my %size;
my $base = pkgs::selectedSize($packages);
foreach (@{$o->{compssUsersSorted}}) {
my $b = pkgs::saveSelected($packages);
- pkgs::selectPackage($packages, $_) foreach @{$compssUsers->{$_}};
+ $_->{values}[$ind] < $min_level or pkgs::selectPackage($packages, $_) foreach @{$compssUsers->{$_}};
$size{$_} = pkgs::selectedSize($packages) - $base;
pkgs::restoreSelected($b);
}
@@ -498,11 +498,12 @@ sub chooseGroups {
my $b = pkgs::saveSelected($packages);
foreach (@{$o->{compssUsersSorted}}) {
- pkgs::selectPackage($packages, $_) foreach @{$compssUsers->{$_}};
+ $_->{values}[$ind] < $min_level or pkgs::selectPackage($packages, $_) foreach @{$compssUsers->{$_}};
}
$size{Miscellaneous} = $max_size - pkgs::selectedSize($packages);
pkgs::restoreSelected($b);
}
+ @groups = grep { $size{$_} = round_down($size{$_} / sqr(1024), 10) } @groups; #- don't display the empty or small one (eg: because all packages are below $min_level)
my $all;
$o->ask_many_from_list('', _("Package Group Selection"),
{ list => \@groups,
@@ -514,7 +515,7 @@ sub chooseGroups {
-e "$f.xpm" or $f = '/usr/share/icons/default_section';
"$f.xpm";
},
- label => sub { translate($_) . ($size{$_} ? sprintf " (%d%s)", round_down($size{$_} / sqr(1024), 10), _("MB") : '') },
+ label => sub { translate($_) . ($size{$_} ? sprintf " (%d%s)", $size{$_}, _("MB") : '') },
},
$o->{meta_class} eq 'desktop' ? { list => [ _("All") ], ref => sub { \$all }, shadow => 0 } : (),
$individual ? { list => [ _("Individual package selection") ], ref => sub { $individual } } : (),