summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.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/pkgs.pm
parentf5618683c2ef2ca6592d93622efc5bfe0dbf9e19 (diff)
downloaddrakx-96b255363839bfd7e36619157d877e257db2ba46.tar
drakx-96b255363839bfd7e36619157d877e257db2ba46.tar.gz
drakx-96b255363839bfd7e36619157d877e257db2ba46.tar.bz2
drakx-96b255363839bfd7e36619157d877e257db2ba46.tar.xz
drakx-96b255363839bfd7e36619157d877e257db2ba46.zip
Fix support for suppl. CDs with hdlists file
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm14
1 files changed, 9 insertions, 5 deletions
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,