From a469b956058a42d97711d646e40359ab05c9a7c1 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 26 May 2005 05:47:50 +0000 Subject: Don't use the \d+s regexp on medium ids to see if that's suppl cds. --- perl-install/install_any.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'perl-install/install_any.pm') 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; -- cgit v1.2.1