summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-08-30 13:39:52 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-08-30 13:39:52 +0000
commit96b255363839bfd7e36619157d877e257db2ba46 (patch)
tree0a71281e6dc6c61c7639e38cd45969f869cc6426 /perl-install/install_any.pm
parentf5618683c2ef2ca6592d93622efc5bfe0dbf9e19 (diff)
downloaddrakx-backup-do-not-use-96b255363839bfd7e36619157d877e257db2ba46.tar
drakx-backup-do-not-use-96b255363839bfd7e36619157d877e257db2ba46.tar.gz
drakx-backup-do-not-use-96b255363839bfd7e36619157d877e257db2ba46.tar.bz2
drakx-backup-do-not-use-96b255363839bfd7e36619157d877e257db2ba46.tar.xz
drakx-backup-do-not-use-96b255363839bfd7e36619157d877e257db2ba46.zip
Fix support for suppl. CDs with hdlists file
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm8
1 files changed, 5 insertions, 3 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.