summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-05-05 12:11:11 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-05-05 12:11:11 +0000
commit7b7fcfdf7fcb4f7fa9b3a52e2bf81ae93739e512 (patch)
tree4641c9b55a843d9f27ae6152789be326de323c3d /perl-install/pkgs.pm
parent9d42e52fa720c98850b2c6c58db7b3fe1b17e6dc (diff)
downloaddrakx-backup-do-not-use-7b7fcfdf7fcb4f7fa9b3a52e2bf81ae93739e512.tar
drakx-backup-do-not-use-7b7fcfdf7fcb4f7fa9b3a52e2bf81ae93739e512.tar.gz
drakx-backup-do-not-use-7b7fcfdf7fcb4f7fa9b3a52e2bf81ae93739e512.tar.bz2
drakx-backup-do-not-use-7b7fcfdf7fcb4f7fa9b3a52e2bf81ae93739e512.tar.xz
drakx-backup-do-not-use-7b7fcfdf7fcb4f7fa9b3a52e2bf81ae93739e512.zip
no_comment
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index a41d235cd..8c4761872 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -172,8 +172,8 @@ sub extractHeaders($$$) {
my $A = -1.922e-05;
my $B = 1.18411;
my $C = 33.2;
-sub correctSize { ($A * $_[0] + $B) * $_[0] + $C } #- size correction in MB.
-sub invCorrectSize { (sqrt(sqr($B) + 4 * $A * ($_[0] - $C)) - $B) / 2 / $A }
+sub correctSize { max($_[0], ($A * $_[0] + $B) * $_[0] + $C) } #- size correction in MB.
+sub invCorrectSize { min($_[0], (sqrt(sqr($B) + 4 * $A * ($_[0] - $C)) - $B) / 2 / $A) } #- size correction in MB.
sub selectedSize {
my ($packages) = @_;
@@ -604,7 +604,6 @@ sub readCompssUsers {
#- }
sub setSelectedFromCompssList {
- log::l("setSelectedFromCompssList");
my ($compssListLevels, $packages, $min_level, $max_size, $install_class) = @_;
my $ind = $compssListLevels->{$install_class}; defined $ind or log::l("unknown install class $install_class in compssList"), return;
my $nb = selectedSize($packages);
@@ -630,13 +629,13 @@ sub setSelectedFromCompssList {
}
if ($max_size && $nb > $max_size) {
$min_level = $p->{values}[$ind];
- log::l("setSelectedFromCompssList: up to indice $min_level (reached size $nb)");
last;
}
#- at this point the package can safely be selected.
selectPackage($packages, $p);
}
+ log::l("setSelectedFromCompssList: reached size $nb, up to indice $min_level (less than $max_size)");
$ind, $min_level;
}
@@ -891,6 +890,7 @@ sub install($$$;$$) {
#- one or many transaction.
my ($total, $nb);
foreach my $pkg (@$toInstall) {
+ print packageName($pkg), "\n";
$packages{packageName($pkg)} = $pkg;
$nb++;
$total += packageSize($pkg);