From bbe401b766272753bd1d25942322fc3928132020 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 5 May 2000 07:33:30 +0000 Subject: no_comment --- perl-install/install_any.pm | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'perl-install/install_any.pm') 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"; } -- cgit v1.2.1