summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-05-05 07:33:30 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-05-05 07:33:30 +0000
commitbbe401b766272753bd1d25942322fc3928132020 (patch)
treec5528626457d8514c6879fa536ab967999d19f64 /perl-install/install_any.pm
parent4e096379cad750ecfdb7ddd78eeae899380a7696 (diff)
downloaddrakx-bbe401b766272753bd1d25942322fc3928132020.tar
drakx-bbe401b766272753bd1d25942322fc3928132020.tar.gz
drakx-bbe401b766272753bd1d25942322fc3928132020.tar.bz2
drakx-bbe401b766272753bd1d25942322fc3928132020.tar.xz
drakx-bbe401b766272753bd1d25942322fc3928132020.zip
no_comment
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";
}