summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm18
1 files changed, 15 insertions, 3 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index a9696327a..cff5446ab 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -227,13 +227,25 @@ sub shells($) {
sub getAvailableSpace {
my ($o) = @_;
- do { $_->{mntpoint} eq '/usr' and return int($_->{size} * 512 / 1.07) } foreach @{$o->{fstab}};
- do { $_->{mntpoint} eq '/' and return int($_->{size} * 512 / 1.07) } foreach @{$o->{fstab}};
+ #- make sure of this place to be available for installation, this could help a lot.
+ #- currently doing a very small install use 36Mb of postinstall-rpm, but installing
+ #- these packages may eat up to 90Mb (of course not all the server may be installed!).
+ #- 50mb may be a good choice to avoid almost all problem of insuficient space left...
+ my $minAvailableSize = 50 * sqr(1024);
+
+ int getAvailableSpace_raw($o->{fstab}) * 512 / 1.07 - $minAvailableSize;
+}
+
+sub getAvailableSpace_raw {
+ my ($fstab) = @_;
+
+ do { $_->{mntpoint} eq '/usr' and return $_->{size} } foreach @$fstab;
+ do { $_->{mntpoint} eq '/' and return $_->{size} } foreach @$fstab;
if ($::testing) {
my $nb = 650;
log::l("taking ${nb}MB for testing");
- return $nb << 20;
+ return $nb << 11;
}
die "missing root partition";
}