From 50edb3c63a62c3b842f483588bdde8deb8a4fc84 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 14 Dec 2016 16:41:26 +0100 Subject: (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 --- perl-install/install/NEWS | 2 ++ perl-install/install/pkgs.pm | 4 ++++ 2 files changed, 6 insertions(+) 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) { -- cgit v1.2.1