summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-09-03 18:39:50 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-09-03 18:39:50 +0000
commitcb44eccff1c9027ba26bd3a23a137ea6a083ae9d (patch)
tree1892d629718091ce066566ff11d273d873eabac8
parentfd908603f3d9a89a3f36f706b43ea8af0ddc25d4 (diff)
downloaddrakx-cb44eccff1c9027ba26bd3a23a137ea6a083ae9d.tar
drakx-cb44eccff1c9027ba26bd3a23a137ea6a083ae9d.tar.gz
drakx-cb44eccff1c9027ba26bd3a23a137ea6a083ae9d.tar.bz2
drakx-cb44eccff1c9027ba26bd3a23a137ea6a083ae9d.tar.xz
drakx-cb44eccff1c9027ba26bd3a23a137ea6a083ae9d.zip
no_comment
-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 ed0b65fee..a1109f68e 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -81,6 +81,19 @@ sub shells($) {
@l ? @l : "/bin/bash";
}
+sub getAvailableSpace {
+ my ($o) = @_;
+
+ do { $_->{mntpoint} eq '/usr' and return $_->{size} << 9 } foreach @{$o->{fstab}};
+ do { $_->{mntpoint} eq '/' and return $_->{size} << 9 } foreach @{$o->{fstab}};
+
+ if ($::testing) {
+ log::l("taking 200MB for testing");
+ return 200 << 20;
+ }
+ die "missing root partition";
+}
+
sub setPackages {
my ($o) = @_;
@@ -97,9 +110,8 @@ sub setPackages {
$o->{packages}{$_}{base} = 1 foreach @{$o->{base}};
pkgs::setShowFromCompss($o->{compss}, $o->{installClass}, $o->{lang});
- #PIXEL
- my $size = 100 << 20;
- pkgs::setSelectedFromCompssList($o->{compssList}, $o->{packages},$size , $o->{installClass}, $o->{lang});
+
+ pkgs::setSelectedFromCompssList($o->{compssList}, $o->{packages}, getAvailableSpace($o) * 0.7, $o->{installClass}, $o->{lang});
}
sub addToBeDone(&$) {