summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-09-18 22:46:49 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-09-18 22:46:49 +0000
commit572677326167d3325714beee743d3d263f4f62fe (patch)
tree88f861661a2dcf1d8477488e7f9769f5e793e480 /perl-install/pkgs.pm
parent9f78dc1be419fc7ee7eef01dde2474a5c3fb7900 (diff)
downloaddrakx-backup-do-not-use-572677326167d3325714beee743d3d263f4f62fe.tar
drakx-backup-do-not-use-572677326167d3325714beee743d3d263f4f62fe.tar.gz
drakx-backup-do-not-use-572677326167d3325714beee743d3d263f4f62fe.tar.bz2
drakx-backup-do-not-use-572677326167d3325714beee743d3d263f4f62fe.tar.xz
drakx-backup-do-not-use-572677326167d3325714beee743d3d263f4f62fe.zip
tentative to correct install time for big installs
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index f4fc3d3b0..9f097156f 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -165,6 +165,20 @@ sub selectedSize {
}
sub correctedSelectedSize { correctSize(selectedSize($_[0]) / sqr(1024)) }
+sub size2time {
+ my ($x, $max) = @_;
+ my $A = 7e-07;
+ my $limit = min($max * 3 / 4, 9e8);
+ if ($x < $limit) {
+ $A * $x;
+ } else {
+ $x -= $limit;
+ my $B = 6e-16;
+ my $C = 15e-07;
+ $B * $x ** 2 + $C * $x + $A * $limit;
+ }
+}
+
#- searching and grouping methods.
#- package is a reference to list that contains