From 95c2424f5df17b99bbee43adb6e2fd64dd86999c Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Tue, 13 Dec 2016 23:46:36 +0000 Subject: More int64 fixes --- perl-install/install/NEWS | 2 ++ perl-install/install/pkgs.pm | 17 +++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 2765c7f65..351521ab7 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,5 @@ +- fix more i586 problems with int64 (mga#19933, mga#19930) + Version 17.65 - 12 December 2016 - bootloader configuration: 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; } } -- cgit v1.2.1