summaryrefslogtreecommitdiffstats
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
parent6c7ab73ba736969da7bcbd3bb291595ac6fc6ecb (diff)
downloaddrakx-ce89dbb35f65ead43a7c37cca7b838bf372f3331.tar
drakx-ce89dbb35f65ead43a7c37cca7b838bf372f3331.tar.gz
drakx-ce89dbb35f65ead43a7c37cca7b838bf372f3331.tar.bz2
drakx-ce89dbb35f65ead43a7c37cca7b838bf372f3331.tar.xz
drakx-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
-rw-r--r--perl-install/install/NEWS4
-rw-r--r--perl-install/install/media.pm10
2 files changed, 11 insertions, 3 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 83bf0da22..e831cafea 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,7 @@
+- 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]
+
Version 10.4.214 - 26 September 2007, by Thierry Vignaud
- do not ask desktop choice in upgrade (#34025)
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,