summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-05-07 17:07:30 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-05-07 17:07:30 +0000
commit73053fb0bb6255c13deecd198499cfc4479134bc (patch)
treef5e5e1ae0259613e69c9041f6745ec2f967eff1f /perl-install
parent6e0714d453adf6cb59f3a8083d3561d5f274be16 (diff)
downloaddrakx-backup-do-not-use-73053fb0bb6255c13deecd198499cfc4479134bc.tar
drakx-backup-do-not-use-73053fb0bb6255c13deecd198499cfc4479134bc.tar.gz
drakx-backup-do-not-use-73053fb0bb6255c13deecd198499cfc4479134bc.tar.bz2
drakx-backup-do-not-use-73053fb0bb6255c13deecd198499cfc4479134bc.tar.xz
drakx-backup-do-not-use-73053fb0bb6255c13deecd198499cfc4479134bc.zip
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/ChangeLog5
-rw-r--r--perl-install/install_steps.pm2
-rw-r--r--perl-install/install_steps_gtk.pm4
-rw-r--r--perl-install/install_steps_interactive.pm12
-rw-r--r--perl-install/pkgs.pm2
5 files changed, 15 insertions, 10 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog
index b4a590f33..bae6c9251 100644
--- a/perl-install/ChangeLog
+++ b/perl-install/ChangeLog
@@ -1,5 +1,10 @@
2000-05-07 Pixel <pixel@mandrakesoft.com>
+ * install_steps.pm (choosePackages): return availableCorrected
+ instead of available
+
+ * pkgs.pm (correctSize): add 18MB for full multi-cd (many hdlist's)
+
* modules.pm (text2driver): same as text2lang below
* keyboard.pm (text2keyboard): same as text2lang below
* lang.pm (text2lang): replace the while (... each) by a foreach
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 03115536c..ba53ea6c5 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -241,7 +241,7 @@ sub choosePackages {
add2hash_($o, { compssListLevel => $::expert ? 90 : 80 }) unless $::auto_install;
pkgs::setSelectedFromCompssList($o->{compssListLevels}, $packages, $o->{compssListLevel}, $available, $o->{installClass}) if exists $o->{compssListLevel};
- $available;
+ $availableCorrected;
}
sub beforeInstallPackages {
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 7807eeaa0..c48a5b982 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -297,8 +297,8 @@ _("Choose the sizes"),
#------------------------------------------------------------------------------
sub chooseSizeToInstall {
- my ($o, $packages, $min_size, $max_size_, $available, $individual) = @_;
- my $max_size = min($max_size_, $available * 0.9);
+ my ($o, $packages, $min_size, $max_size_, $availableC, $individual) = @_;
+ my $max_size = min($max_size_, $availableC);
my $enough = $max_size == $max_size_;
my $percentage = int 100 * $max_size / $max_size_;
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index ada8e2c59..97618c1d6 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -275,13 +275,13 @@ sub choosePackages {
#- selection of CD by user if using a cdrom.
$o->chooseCD($packages) if $o->{method} eq 'cdrom';
- my $available = install_steps::choosePackages(@_);
+ my $availableC = install_steps::choosePackages(@_);
my $individual = $::expert;
require pkgs;
my $min_size = pkgs::selectedSize($packages);
- $min_size < $available or die _("Your system has not enough space left for installation or upgrade");
+ $min_size < $availableC or die _("Your system has not enough space left for installation or upgrade");
$o->chooseGroups($packages, $compssUsers, $compssUsersSorted, \$individual) unless $::beginner || $::corporate;
@@ -292,12 +292,12 @@ sub choosePackages {
my $max_size = pkgs::selectedSize($packages);
mapn { pkgs::packageSetFlagSelected(@_) } \@l, \@flags;
-#- if (!$::beginner && $max_size > $available) {
+#- if (!$::beginner && $max_size > $availableC) {
#- $o->ask_okcancel('',
#-_("You need %dMB for a full install of the groups you selected.
#-You can go on anyway, but be warned that you won't get all packages", $max_size / sqr(1024)), 1) or goto &choosePackages
#- }
- my $size2install = $::beginner && $first_time ? $available * 0.7 : $o->chooseSizeToInstall($packages, $min_size, $max_size, $available, $individual) or goto &choosePackages;
+ my $size2install = $::beginner && $first_time ? $availableC * 0.7 : $o->chooseSizeToInstall($packages, $min_size, $max_size, $availableC, $individual) or goto &choosePackages;
($o->{packages_}{ind}) =
pkgs::setSelectedFromCompssList($o->{compssListLevels}, $packages, $min_mark, $size2install, $o->{installClass});
@@ -305,8 +305,8 @@ sub choosePackages {
}
sub chooseSizeToInstall {
- my ($o, $packages, $min, $max, $available) = @_;
- $available * 0.7;
+ my ($o, $packages, $min, $max, $availableC) = @_;
+ $availableC * 0.7;
}
sub choosePackagesTree {}
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 13ba2002b..2560bcaf2 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -171,7 +171,7 @@ sub extractHeaders($$$) {
#- size and correction size functions for packages.
my $A = -1.922e-05;
my $B = 1.18411;
-my $C = 33.2;
+my $C = 33.2 + 18; #- 18 added cuz of hdlist's
sub correctSize { max($_[0], ($A * $_[0] + $B) * $_[0] + $C) } #- size correction in MB.
sub invCorrectSize { min($_[0], (sqrt(sqr($B) + 4 * $A * ($_[0] - $C)) - $B) / 2 / $A) } #- size correction in MB.