summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-04-27 22:22:49 +0000
committerFrancois Pons <fpons@mandriva.com>2000-04-27 22:22:49 +0000
commit053755d74f85fa59781581589ddd06cb59949333 (patch)
tree9973a83464ec2befd8832b1cd2f1b077ebe36410 /perl-install/install_steps.pm
parent1ebf6242bfbbe356cb8cb0e61395ba675afc0e75 (diff)
downloaddrakx-053755d74f85fa59781581589ddd06cb59949333.tar
drakx-053755d74f85fa59781581589ddd06cb59949333.tar.gz
drakx-053755d74f85fa59781581589ddd06cb59949333.tar.bz2
drakx-053755d74f85fa59781581589ddd06cb59949333.tar.xz
drakx-053755d74f85fa59781581589ddd06cb59949333.zip
*** empty log message ***
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r--perl-install/install_steps.pm21
1 files changed, 17 insertions, 4 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 10d114b8a..0d425d209 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -2,7 +2,7 @@ package install_steps;
use diagnostics;
use strict;
-use vars qw(@filesToSaveForUpgrade);
+use vars qw($minAvailableSize @filesToSaveForUpgrade);
#-######################################################################################
#- misc imports
@@ -24,6 +24,7 @@ use network;
use any;
use fs;
+$minAvailableSize = 5 * sqr(1024);
@filesToSaveForUpgrade = qw(
/etc/ld.so.conf /etc/fstab /etc/hosts /etc/conf.modules
);
@@ -221,10 +222,15 @@ sub selectPackagesToUpgrade {
sub choosePackages {
my ($o, $packages, $compss, $compssUsers, $compssUsersSorted, $first_time) = @_;
- return if $o->{isUpgrade};
+ #- now for upgrade, package that must be upgraded are
+ #- selected first, after is used the same scheme as install.
+
+ #- make sure we kept some space left for available else the system may
+ #- not be able to start (xfs at least).
+ my $available = install_any::getAvailableSpace($o) - $minAvailableSize;
+ my $availableCorrected = pkgs::invCorrectSize($available / sqr(1024)) * sqr(1024);
+ $available < $availableCorrected or $available = $availableCorrected;
- my $available = pkgs::invCorrectSize(install_any::getAvailableSpace($o) / sqr(1024)) * sqr(1024);
-
foreach (values %{$packages->[0]}) {
pkgs::packageSetFlagSkip($_, 0);
pkgs::packageSetFlagUnskip($_, 0);
@@ -908,6 +914,13 @@ sub generateAutoInstFloppy($) {
}
#------------------------------------------------------------------------------
+sub hasNetwork {
+ my ($o) = @_;
+
+ $o->{intf} && $o->{netc}{NETWORKING} ne 'false' || $o->{modem};
+}
+
+#------------------------------------------------------------------------------
sub upNetwork {
my ($o, $pppAvoided) = @_;