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.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";
+}