summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-09-10 09:15:24 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-09-10 09:15:24 +0000
commitfd82c0312a315599fb0d766fa5c6b7be4b211ba3 (patch)
treed7a1e782db5b8b42cd9d4f5795d3da0b92871773 /perl-install/install_any.pm
parent1cfe6c79ba71ee10522049af62e959b79cd7c9ed (diff)
downloaddrakx-fd82c0312a315599fb0d766fa5c6b7be4b211ba3.tar
drakx-fd82c0312a315599fb0d766fa5c6b7be4b211ba3.tar.gz
drakx-fd82c0312a315599fb0d766fa5c6b7be4b211ba3.tar.bz2
drakx-fd82c0312a315599fb0d766fa5c6b7be4b211ba3.tar.xz
drakx-fd82c0312a315599fb0d766fa5c6b7be4b211ba3.zip
no_comment
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm26
1 files changed, 21 insertions, 5 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 0b9989377..47d4808a4 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -11,6 +11,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK);
@EXPORT_OK = map { @$_ } values %EXPORT_TAGS;
use common qw(:common :system);
+use run_program;
use pkgs;
use smp;
use log;
@@ -94,8 +95,8 @@ sub getAvailableSpace {
die "missing root partition";
}
-sub setPackages {
- my ($o) = @_;
+sub setPackages($$) {
+ my ($o, $install_classes) = @_;
unless ($o->{package}) {
my $useHdlist = $o->{method} !~ /nfs|hd/;
@@ -105,17 +106,18 @@ sub setPackages {
pkgs::getDeps($o->{packages});
$o->{compss} = pkgs::readCompss ($o->{packages});
- $o->{compssList} = pkgs::readCompssList($o->{packages});
+ $o->{compssListLevels} = pkgs::readCompssList($o->{packages});
+ $o->{compssListLevels} ||= $install_classes;
push @{$o->{base}}, "kernel-smp" if smp::detect();
do {
my $p = $o->{packages}{$_} or log::l(), next;
pkgs::select($o->{packages}, $p, 1);
} foreach @{$o->{base}};
- }
+ }
pkgs::setShowFromCompss($o->{compss}, $o->{installClass}, $o->{lang});
- pkgs::setSelectedFromCompssList($o->{compssList}, $o->{packages}, getAvailableSpace($o) * 0.7, $o->{installClass}, $o->{lang});
+ pkgs::setSelectedFromCompssList($o->{compssListLevels}, $o->{packages}, getAvailableSpace($o) * 0.7, $o->{installClass}, $o->{lang});
}
sub addToBeDone(&$) {
@@ -125,3 +127,17 @@ sub addToBeDone(&$) {
push @{$::o->{steps}{$step}{toBeDone}}, $f;
}
+
+sub install_cpio {
+ my ($dir, $name) = @_;
+
+ return if -e "$dir/$name";
+
+ my $cpio = "$dir.cpio.bz2";
+ -e $cpio or return;
+
+ commands::rm "-r", $dir;
+ mkdir $dir, 0755;
+ run_program::run("cd $dir ; bzip2 -cd $cpio | cpio -i $name");
+ "$dir/$name";
+}