summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-05-26 05:47:50 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-05-26 05:47:50 +0000
commita469b956058a42d97711d646e40359ab05c9a7c1 (patch)
treedee9c47c4ead128cb4d93f9039ab0535d4383a87 /perl-install
parentea2769a7a8531575bafd4cf8d10fb207e0123cfa (diff)
downloaddrakx-a469b956058a42d97711d646e40359ab05c9a7c1.tar
drakx-a469b956058a42d97711d646e40359ab05c9a7c1.tar.gz
drakx-a469b956058a42d97711d646e40359ab05c9a7c1.tar.bz2
drakx-a469b956058a42d97711d646e40359ab05c9a7c1.tar.xz
drakx-a469b956058a42d97711d646e40359ab05c9a7c1.zip
Don't use the \d+s regexp on medium ids to see if that's suppl cds.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install_any.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index e491a8f8e..682e5cb91 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -79,7 +79,7 @@ sub askChangeMedium($$) {
my ($method, $medium_name) = @_;
my $allow;
do {
- local $::o->{method} = $method = 'cdrom' if $medium_name =~ /^\d+s$/; #- Suppl CD
+ local $::o->{method} = $method = 'cdrom' if install_medium::by_id($medium_name)->is_suppl_cd;
eval { $allow = changeMedium($method, $medium_name) };
} while $@; #- really it is not allowed to die in changeMedium!!! or install will core with rpmlib!!!
log::l($allow ? "accepting medium $medium_name" : "refusing medium $medium_name");
@@ -184,7 +184,8 @@ sub errorOpeningFile($) {
}
#- Do not unselect supplementary CDs.
- return if $asked_medium =~ /^\d+s$/;
+ #return if $asked_medium =~ /^\d+s$/;
+ return if install_medium::by_id($asked_medium)->is_suppl_cd;
#- keep in mind the asked medium has been refused on this way.
#- this means it is no more selected.
@@ -449,7 +450,6 @@ sub selectSupplMedia {
'Network (http)' => 'http',
'Network (ftp)' => 'ftp',
}->{$suppl};
- #- by convention, the media names for suppl. CDs match /^\d+s$/
my $medium_name = $suppl_method eq 'cdrom'
? (max(map { $_->{medium} =~ /^(\d+)s$/ ? $1 : 0 } values %{$o->{packages}{mediums}}) + 1) . "s"
: int(keys %{$o->{packages}{mediums}}) + 1;