summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install_any.pm5
-rw-r--r--perl-install/install_steps_interactive.pm15
-rw-r--r--perl-install/pkgs.pm10
3 files changed, 15 insertions, 15 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 9260cbb39..23beb47bc 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -316,11 +316,10 @@ sub setPackages {
$o->{compss} = pkgs::readCompss($o->{prefix}, $o->{packages});
#- must be done after getProvides
pkgs::read_rpmsrate($o->{packages}, getFile("Mandrake/base/rpmsrate"));
- ($o->{compssUsers}, $o->{compssUsersSorted}, $o->{compssUsersIcons}, $o->{compssUsersDescr}) =
- pkgs::readCompssUsers($o->{packages}, $o->{meta_class});
+ ($o->{compssUsers}, $o->{compssUsersSorted}) = pkgs::readCompssUsers($o->{packages}, $o->{meta_class});
if ($::auto_install && !$o->{compssUsersChoice}) {
- $o->{compssUsersChoice}{$_} = 1 foreach map { @{$o->{compssUsers}{$_}} } @{$o->{compssUsersSorted}};
+ $o->{compssUsersChoice}{$_} = 1 foreach map { @{$o->{compssUsers}{$_}{flags}} } @{$o->{compssUsersSorted}};
}
$o->{compssUsersChoice}{SYSTEM} = 1;
$o->{compssUsersChoice}{BURNER} = 1 if detect_devices::burners();
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 104ed2542..69bcc59fe 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -449,7 +449,8 @@ sub choosePackages {
my $b = pkgs::saveSelected($packages);
pkgs::setSelectedFromCompssList($packages, $o->{compssUsersChoice}, $def_mark, 0);
my $def_size = pkgs::selectedSize($packages) + 1; #- avoid division by zero.
- my $level = pkgs::setSelectedFromCompssList($packages, { map { $_ => 1 } map { @{$compssUsers->{$_}} } @{$o->{compssUsersSorted}} }, $min_mark, 0);
+ pkgs::computeGroupSize($packages, $min_mark);
+ my $level = pkgs::setSelectedFromCompssList($packages, { map { $_ => 1 } map { @{$compssUsers->{$_}{flags}} } @{$o->{compssUsersSorted}} }, $min_mark, 0);
my $max_size = pkgs::selectedSize($packages) + 1; #- avoid division by zero.
pkgs::restoreSelected($b);
@@ -528,16 +529,16 @@ sub chooseGroups {
my @groups = @{$o->{compssUsersSorted}};
my %val;
foreach (@groups) {
- $val{$_} = ! grep { ! $o->{compssUsersChoice}{$_} } @{$compssUsers->{$_}};
+ $val{$_} = ! grep { ! $o->{compssUsersChoice}{$_} } @{$compssUsers->{$_}{flags}};
}
# @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,
- help => sub { translate($o->{compssUsersDescr}{$_}) },
+ help => sub { translate($o->{compssUsers}{$_}{descr}) },
val => sub { \$val{$_} },
icon2f => sub {
- my $f = "/usr/share/icons/" . ($o->{compssUsersIcons}{$_} || 'default');
+ my $f = "/usr/share/icons/" . ($o->{compssUsers}{$_}{icons} || 'default');
-e "$f.png" or $f .= "_section";
-e "$f.png" or $f = '/usr/share/icons/default_section';
"$f.png";
@@ -548,10 +549,10 @@ sub chooseGroups {
if_($individual, { list => [ _("Individual package selection") ], val => sub { $individual }, advanced => 1 }),
) or return;
if ($all) {
- $o->{compssUsersChoice}{$_} = 1 foreach map { @{$compssUsers->{$_}} } @{$o->{compssUsersSorted}};
+ $o->{compssUsersChoice}{$_} = 1 foreach map { @{$compssUsers->{$_}{flags}} } @{$o->{compssUsersSorted}};
} else {
- $o->{compssUsersChoice}{$_} = 0 foreach map { @{$compssUsers->{$_}} } grep { !$val{$_} } keys %val;
- $o->{compssUsersChoice}{$_} = 1 foreach map { @{$compssUsers->{$_}} } grep { $val{$_} } keys %val;
+ $o->{compssUsersChoice}{$_} = 0 foreach map { @{$compssUsers->{$_}{flags}} } grep { !$val{$_} } keys %val;
+ $o->{compssUsersChoice}{$_} = 1 foreach map { @{$compssUsers->{$_}{flags}} } grep { $val{$_} } keys %val;
}
1;
}
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index cc3d083a7..acc73abcf 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -658,7 +658,7 @@ sub read_rpmsrate {
sub readCompssUsers {
my ($packages, $meta_class) = @_;
- my (%compssUsers, %compssUsersIcons, , %compssUsersDescr, @sorted, $l);
+ my (%compssUsers, @sorted, $l);
my (%compss);
my $file = 'Mandrake/base/compssUsers';
@@ -672,15 +672,15 @@ sub readCompssUsers {
my ($icon, $descr);
/^(.*?)\s*\[icon=(.*?)\](.*)/ and $_ = "$1$3", $icon = $2;
/^(.*?)\s*\[descr=(.*?)\](.*)/ and $_ = "$1$3", $descr = $2;
- $compssUsersIcons{$_} = $icon;
- $compssUsersDescr{$_} = $descr;
+ $compssUsers{$_}{icons} = $icon;
+ $compssUsers{$_}{descr} = $descr;
push @sorted, $_;
- $compssUsers{$_} = $l = [];
+ $compssUsers{$_}{flags} = $l = [];
} elsif (/^\s+(.*?)\s*$/) {
push @$l, $1;
}
}
- \%compssUsers, \@sorted, \%compssUsersIcons, \%compssUsersDescr;
+ \%compssUsers, \@sorted;
}
sub setSelectedFromCompssList {