summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-03-19 16:07:59 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-03-19 16:07:59 +0000
commit9f2607e3e4d659b82063136418940da050930af8 (patch)
tree9937ac9d743e3ea0f4e587141eab57ac0208196e /perl-install
parent0c868f864857b8073fba1b239a09c1c0597af117 (diff)
downloaddrakx-backup-do-not-use-9f2607e3e4d659b82063136418940da050930af8.tar
drakx-backup-do-not-use-9f2607e3e4d659b82063136418940da050930af8.tar.gz
drakx-backup-do-not-use-9f2607e3e4d659b82063136418940da050930af8.tar.bz2
drakx-backup-do-not-use-9f2607e3e4d659b82063136418940da050930af8.tar.xz
drakx-backup-do-not-use-9f2607e3e4d659b82063136418940da050930af8.zip
(computeGroupSize): fix hacks, better hacks
(saveCompssUsers): fix
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/pkgs.pm13
1 files changed, 8 insertions, 5 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 5acd43037..6b4b840a3 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -706,6 +706,7 @@ sub setSelectedFromCompssList {
selectPackage($packages, $p);
}
log::l("setSelectedFromCompssList: reached size ", formatXiB($nb), ", up to indice $min_level (less than ", formatXiB($max_size), ")");
+ log::l("setSelectedFromCompssList: ", join(" ", sort map { packageName($_) } grep { packageFlagSelected($_) } @{$packages->{depslist}}));
$min_level;
}
@@ -747,10 +748,11 @@ sub computeGroupSize {
map { "$_&&$n" } @l;
} split('\|\|');
}
- @l;
+ #- HACK, remove LOCALES, too costly
+ grep { !/LOCALES/ } @l;
}
sub or_clean {
- my (@l) = map { [ sort split('&&') ] } @_;
+ my (@l) = map { [ sort split('&&') ] } @_ or return '';
my @r;
B: while (@l) {
my $e = shift @l;
@@ -768,7 +770,7 @@ sub computeGroupSize {
next if !$rate || $rate < $min_level;
my $flags = join("\t", @flags = or_ify(@flags));
- $group{packageName($p)} = $flags =~ /SYSTEM/ ? 'SYSTEM' : ($memo{$flags} ||= or_clean(@flags));
+ $group{packageName($p)} = ($memo{$flags} ||= or_clean(@flags));
#- determine the packages that will be selected when selecting $p. the packages are not selected.
my %newSelection;
@@ -778,8 +780,9 @@ sub computeGroupSize {
$packages->{names}{$_}[$VALUES] =~ /\t(.*)/;
join("\t", or_ify(split("\t", $1)));
};
+ next if length($s) > 80; # HACK, truncated too complicated expressions, too costly
my $m = "$flags\t$s";
- $group{$_} = $m =~ /SYSTEM/ ? 'SYSTEM' : ($memo{$m} ||= or_clean(@flags, split("\t", $s)));
+ $group{$_} = ($memo{$m} ||= or_clean(@flags, split("\t", $s)));
}
}
my (%sizes, %pkgs);
@@ -788,7 +791,7 @@ sub computeGroupSize {
$sizes{$v} += packageSize($packages->{names}{$k});
}
log::l(sprintf "%s %dMB %s", $_, $sizes{$_} / sqr(1024), join(',', @{$pkgs{$_}})) foreach keys %sizes;
- \%sizes;
+ \%sizes, \%pkgs;
}