summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/install_any.pm8
-rw-r--r--perl-install/pkgs.pm14
2 files changed, 14 insertions, 8 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index a64dade5e..cf0939bc2 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -208,9 +208,9 @@ sub getFile {
#- first CD have been copied to other to avoid media change...
my $f2 = "$postinstall_rpms/$f";
$o_altroot ||= '/tmp/image';
- $f2 = "$o_altroot/$rel" if !$postinstall_rpms || !-e $f2;
+ $f2 = "$o_altroot/$rel" if $rel !~ m,^/, && (!$postinstall_rpms || !-e $f2);
#- $f2 = "/$rel" if !$::o->{packages}{mediums}{$asked_medium}{rpmsdir} && !-e $f2; #- not a relative path, should not be necessary with new media layout
- my $F; open($F, $f2) && $F;
+ my $F; open($F, $f2) && $F or do { log::l("Can't open $f2: $!"); return undef }
}
} || errorOpeningFile($f);
}
@@ -410,8 +410,9 @@ sub selectSupplMedia {
log::l($@) if $@;
useMedium($medium_name);
#- probe for an hdlists file and then look for all hdlists listed herein
- eval { pkgs::psUsingHdlists($o->{prefix}, $suppl_method, "/mnt/cdrom/media/media_info/hdlists", $o->{packages}) };
+ eval { pkgs::psUsingHdlists($o->{prefix}, $suppl_method, "/mnt/cdrom/media/media_info/hdlists", $o->{packages}, '1s') };
if ($@) {
+ log::l("psUsingHdlists failed: $@");
#- no hdlists found on the suppl. CD
#- Look directly for a file media/main/hdlist1s.cz
my $supplmedium = pkgs::psUsingHdlist(
@@ -494,6 +495,7 @@ sub setPackages {
my $cdrom;
($o->{packages}, my $suppl_method) = pkgs::psUsingHdlists($o->{prefix}, $o->{method});
+ 1 while
$suppl_method = $o->selectSupplMedia($suppl_method);
#- open rpm db according to right mode needed.
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index ca694f54c..7b66bca23 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -378,7 +378,7 @@ sub psUpdateHdlistsDeps {
}
sub psUsingHdlists {
- my ($prefix, $method, $o_hdlistsfile, $o_packages) = @_;
+ my ($prefix, $method, $o_hdlistsfile, $o_packages, $o_initialmedium) = @_;
my $listf = install_any::getFile($o_hdlistsfile || 'media/media_info/hdlists')
or die "no hdlists found";
my $suppl_CDs = 0;
@@ -389,7 +389,7 @@ sub psUsingHdlists {
}
#- parse hdlists file.
- my $medium_name = 1;
+ my $medium_name = $o_initialmedium || 1;
foreach (<$listf>) {
chomp;
s/\s*#.*$//;
@@ -401,9 +401,13 @@ sub psUsingHdlists {
#- make sure the first medium is always selected!
#- by default select all image.
- psUsingHdlist($prefix, $method, $o_packages, $2, $medium_name, $3, $4, !$1);
+ psUsingHdlist(
+ $prefix, $method, $o_packages, $2, $medium_name, $3, $4, !$1,
+ #- hdlist path, suppl CDs are mounted on /mnt/cdrom :
+ index($medium_name, 's') >= 0 ? "/mnt/cdrom/media/media_info/$2" : undef,
+ );
- ++$medium_name;
+ $medium_name =~ /s$/ ? ($medium_name = ($medium_name + 1) . 's') : ++$medium_name;
}
log::l("psUsingHdlists read " . int(@{$o_packages->{depslist}}) .
@@ -419,7 +423,7 @@ sub psUsingHdlist {
log::l("trying to read $hdlist for medium $medium_name");
#- if the medium already exists, use it.
- $packages->{mediums}{$medium_name} and return $packages->{mediums}{$medium_name};
+ #$packages->{mediums}{$medium_name} and return $packages->{mediums}{$medium_name};
my $m = { hdlist => $hdlist,
method => $method,