summaryrefslogtreecommitdiffstats
path: root/perl-install/install/pkgs.pm
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@gmail.com>2016-12-13 23:46:36 +0000
committerPascal Terjan <pterjan@gmail.com>2016-12-13 23:46:36 +0000
commit95c2424f5df17b99bbee43adb6e2fd64dd86999c (patch)
treea2aa575d90e0995201e8dd008afe394fe6a4918e /perl-install/install/pkgs.pm
parent9c11732632ebfd2ec56e2106a27153fb963f2de1 (diff)
downloaddrakx-95c2424f5df17b99bbee43adb6e2fd64dd86999c.tar
drakx-95c2424f5df17b99bbee43adb6e2fd64dd86999c.tar.gz
drakx-95c2424f5df17b99bbee43adb6e2fd64dd86999c.tar.bz2
drakx-95c2424f5df17b99bbee43adb6e2fd64dd86999c.tar.xz
drakx-95c2424f5df17b99bbee43adb6e2fd64dd86999c.zip
More int64 fixes
Diffstat (limited to 'perl-install/install/pkgs.pm')
-rw-r--r--perl-install/install/pkgs.pm17
1 files changed, 9 insertions, 8 deletions
diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm
index fa9d8736e..cc2fc4d00 100644
--- a/perl-install/install/pkgs.pm
+++ b/perl-install/install/pkgs.pm
@@ -39,10 +39,11 @@ our %compssListDesc = (
#- TODO BEFORE TODO
#- size and correction size functions for packages.
-my $B = 1.20873;
-my $C = 4.98663; #- does not take hdlist's into account as getAvailableSpace will do it.
-sub correctSize { $B * $_[0] + $C }
-sub invCorrectSize { ($_[0] - $C) / $B }
+my $B = 120873;
+my $C = 498663; #- does not take hdlist's into account as getAvailableSpace will do it.
+my $D = 100000;
+sub correctSize { ($B * $_[0] + $C) / $D }
+sub invCorrectSize { ($_[0] * $D - $C) / $B }
sub selectedSize {
my ($packages) = @_;
@@ -70,14 +71,14 @@ sub selectedSize {
sub size2time {
my ($x, $max) = @_;
- my $A = 7e-07;
+ my $A = 7e9;
my $limit = min($max * 3 / 4, 9e8);
if ($x < $limit) {
- $A * $x;
+ $A * int64_to_number($x);
} else {
$x -= $limit;
- my $B = 6e-16;
- my $C = 15e-07;
+ my $B = 6;
+ my $C = 15e9;
$B * $x ** 2 + $C * $x + $A * $limit;
}
}