summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
diff options
context:
space:
mode:
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) = @_;