summaryrefslogtreecommitdiffstats
path: root/perl-install/install/media.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-26 14:27:04 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-26 14:27:04 +0000
commitce89dbb35f65ead43a7c37cca7b838bf372f3331 (patch)
tree8ff1903afa8939e520518bef317d428f6fa54252 /perl-install/install/media.pm
parent6c7ab73ba736969da7bcbd3bb291595ac6fc6ecb (diff)
downloaddrakx-backup-do-not-use-ce89dbb35f65ead43a7c37cca7b838bf372f3331.tar
drakx-backup-do-not-use-ce89dbb35f65ead43a7c37cca7b838bf372f3331.tar.gz
drakx-backup-do-not-use-ce89dbb35f65ead43a7c37cca7b838bf372f3331.tar.bz2
drakx-backup-do-not-use-ce89dbb35f65ead43a7c37cca7b838bf372f3331.tar.xz
drakx-backup-do-not-use-ce89dbb35f65ead43a7c37cca7b838bf372f3331.zip
- fix using iso CD2 on disk (#33022):
o remove " from medium name when reading media.cfg o handle "Volume id" ending with -CD[123] instead of -Disc[123] and also add some more logs
Diffstat (limited to 'perl-install/install/media.pm')
-rw-r--r--perl-install/install/media.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/perl-install/install/media.pm b/perl-install/install/media.pm
index dcbb107f2..85dcaaf66 100644
--- a/perl-install/install/media.pm
+++ b/perl-install/install/media.pm
@@ -265,6 +265,8 @@ sub associate_phys_media {
foreach my $medium (@$hdlists) {
if (my $phys_m = find { $_->{name} eq $medium->{name} } @phys_media) {
+ $medium->{phys_medium} and log::l("$medium->{name} has already phys_medium $medium->{phys_medium}{url}");
+ log::l("setting medium $medium->{name} phys_medium to $phys_m->{url}");
$medium->{phys_medium} = $phys_m;
} else {
$medium->{selected} = 0;
@@ -322,9 +324,9 @@ sub look_for_ISO_images {
my @media = map {
if (sysopen(my $F, "$iso_dir/$_", 0)) {
my ($vol_id, $app_id) = c::get_iso_volume_ids(fileno $F);
- #- the ISO volume names must end in -Disc\d+ if they belong (!) to a set
+ #- the ISO volume names must end in -CD\d+ if they belong (!) to a set
#- otherwise use the full volume name as CD set identifier
- my $cd_set = $vol_id =~ /^(.*)-disc\d+$/i ? $1 : $vol_id;
+ my $cd_set = $vol_id =~ /^(.*)-(disc|cd|dvd)\d+$/i ? $1 : $vol_id;
log::l("found ISO: file=$_ cd_set=$cd_set app_id=$app_id");
{ cd_set => $cd_set, app_id => $app_id, file => $_ };
@@ -480,10 +482,12 @@ sub parse_media_cfg {
my $distribconf = { map { $_ => $d->getvalue(undef, $_) } 'suppl', 'askmedia' };
my @hdlists = map {
my ($size) = $d->getvalue($_, 'size') =~ /(\d+)MB?/i;
+ my $name = $d->getvalue($_, 'name');
+ $name =~ s/^"(.*)"$/$1/;
{
rpmsdir => $_,
rel_hdlist => 'media_info/' . $d->getvalue($_, 'hdlist'),
- name => $d->getvalue($_, 'name'),
+ name => $name,
size => $size,
selected => !$d->getvalue($_, 'noauto'),
update => $d->getvalue($_, 'updates_for') ? 1 : undef,