summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2016-12-14 16:41:26 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2016-12-14 16:48:01 +0100
commit50edb3c63a62c3b842f483588bdde8deb8a4fc84 (patch)
tree77248e8a8a044b38019a3af31d2841681ff7a5ea
parent1b0aaf551631c1f9c997100b61d674abf7aead75 (diff)
downloaddrakx-50edb3c63a62c3b842f483588bdde8deb8a4fc84.tar
drakx-50edb3c63a62c3b842f483588bdde8deb8a4fc84.tar.gz
drakx-50edb3c63a62c3b842f483588bdde8deb8a4fc84.tar.bz2
drakx-50edb3c63a62c3b842f483588bdde8deb8a4fc84.tar.xz
drakx-50edb3c63a62c3b842f483588bdde8deb8a4fc84.zip
(size2time) enforce returning a float (mga#19930)
with the previous fix, the progress bar will now properly update on i586 will be a float between 0 & 1
-rw-r--r--perl-install/install/NEWS2
-rw-r--r--perl-install/install/pkgs.pm4
2 files changed, 6 insertions, 0 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index b26d09585..78a54736e 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,5 @@
+- fix progress bar on i586 (mga#19930)
+
Version 17.67 - 13 December 2016
- fix a crash introduced in 17.66
diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm
index 6602acf90..b83655401 100644
--- a/perl-install/install/pkgs.pm
+++ b/perl-install/install/pkgs.pm
@@ -69,8 +69,12 @@ sub selectedSize {
$size;
}
+sub int64_to_float { sprintf("%.2f", $_[0])*1 }
+
sub size2time {
my ($x, $max) = @_;
+ $x = int64_to_float($x);
+ $max = int64_to_float($max);
my $A = 7e9;
my $limit = min($max * 3 / 4, 9e8);
if ($x < $limit) {