summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-08-12 09:31:49 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-08-12 09:31:49 +0000
commit96383ba7fe1fc97890f5d86e088caca3bcfc73c0 (patch)
treea649c3f74c185c0963a1d34643b2088299f190cf /perl-install/install_any.pm
parent3c9786002b9179fc49bd22b6b4d8eda0b277c6d1 (diff)
downloaddrakx-backup-do-not-use-96383ba7fe1fc97890f5d86e088caca3bcfc73c0.tar
drakx-backup-do-not-use-96383ba7fe1fc97890f5d86e088caca3bcfc73c0.tar.gz
drakx-backup-do-not-use-96383ba7fe1fc97890f5d86e088caca3bcfc73c0.tar.bz2
drakx-backup-do-not-use-96383ba7fe1fc97890f5d86e088caca3bcfc73c0.tar.xz
drakx-backup-do-not-use-96383ba7fe1fc97890f5d86e088caca3bcfc73c0.zip
First stab at supporting several hdlists on a supplementary CD
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm44
1 files changed, 24 insertions, 20 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index f6f94cf45..53f7f9419 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -396,26 +396,30 @@ sub setPackages {
mountCdrom("/mnt/cdrom", $cdrom);
log::l($@) if $@;
useMedium($medium_name);
- #- TODO probe for an hdlists file, and then look for
- #- all hdlists listed herein
- my $supplmedium = pkgs::psUsingHdlist(
- $o->{prefix}, # /mnt
- $suppl_method,
- $o->{packages},
- "hdlist$medium_name.cz",
- $medium_name,
- 'media/main',
- "Supplementary CD $medium_name",
- 1, # selected
- "/mnt/cdrom/media/main/media_info/hdlist$medium_name.cz",
- );
- if ($supplmedium) {
- log::l("read suppl hdlist on cdrom");
- $supplmedium->{prefix} = "removable://mnt/cdrom"; #- for install_urpmi
- $supplmedium->{selected} = 1;
- $supplmedium->{method} = 'cdrom';
- } else {
- log::l("no suppl hdlist");
+ #- 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}) };
+ if ($@) {
+ #- no hdlists found on the suppl. CD
+ #- Look directly for a file media/main/hdlist1s.cz
+ my $supplmedium = pkgs::psUsingHdlist(
+ $o->{prefix}, # /mnt
+ $suppl_method,
+ $o->{packages},
+ "hdlist$medium_name.cz",
+ $medium_name,
+ 'media/main',
+ "Supplementary CD $medium_name",
+ 1, # selected
+ "/mnt/cdrom/media/main/media_info/hdlist$medium_name.cz",
+ );
+ if ($supplmedium) {
+ log::l("read suppl hdlist on cdrom");
+ $supplmedium->{prefix} = "removable://mnt/cdrom"; #- for install_urpmi
+ $supplmedium->{selected} = 1;
+ $supplmedium->{method} = 'cdrom';
+ } else {
+ log::l("no suppl hdlist");
+ }
}
}
} else {