From ce89dbb35f65ead43a7c37cca7b838bf372f3331 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 26 Sep 2007 14:27:04 +0000 Subject: - 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 --- perl-install/install/media.pm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'perl-install/install/media.pm') 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, -- cgit v1.2.1