summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-05-27 01:57:05 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-05-27 01:57:05 +0000
commite6afe9e361836f42de66f2e1f6f4622f5f99a426 (patch)
tree31893b5e37cfa3ee46349209081283a639e688f1 /perl-install
parentf9138508ab719c6cd033431ccae5d85364f5f2df (diff)
downloaddrakx-backup-do-not-use-e6afe9e361836f42de66f2e1f6f4622f5f99a426.tar
drakx-backup-do-not-use-e6afe9e361836f42de66f2e1f6f4622f5f99a426.tar.gz
drakx-backup-do-not-use-e6afe9e361836f42de66f2e1f6f4622f5f99a426.tar.bz2
drakx-backup-do-not-use-e6afe9e361836f42de66f2e1f6f4622f5f99a426.tar.xz
drakx-backup-do-not-use-e6afe9e361836f42de66f2e1f6f4622f5f99a426.zip
Remove the naming convention with a trailing "s" for supplementary CDs medium ids
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install_any.pm5
-rw-r--r--perl-install/pkgs.pm7
2 files changed, 3 insertions, 9 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index eec4873b1..4a46564a6 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -184,7 +184,6 @@ sub errorOpeningFile($) {
}
#- Do not unselect supplementary CDs.
- #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.
@@ -451,9 +450,7 @@ sub selectSupplMedia {
'Network (http)' => 'http',
'Network (ftp)' => 'ftp',
}->{$suppl};
- 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;
+ my $medium_name = int(keys %{$o->{packages}{mediums}}) + 1;
#- configure network if needed
prep_net_suppl_media($o) if !scalar keys %{$o->{intf}} && $suppl_method !~ /^(?:cdrom|disk)/;
local $::isWizard = 0;
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 836e1ba7b..91c2692aa 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -236,7 +236,7 @@ sub allMediums {
sort {
#- put supplementary media at the end
my @x = ($a, $b);
- foreach (@x) { /(\d+)s/ and $_ = 100 + $1 }
+ foreach (@x) { install_medium::by_id($_, $packages)->is_suppl and $_ += 100 }
$x[0] <=> $x[1];
} keys %{$packages->{mediums}};
}
@@ -1484,10 +1484,7 @@ sub by_id {
}
#- is this medium a supplementary medium ?
-sub is_suppl {
- my ($self) = @_;
- $self->{issuppl} || $self->{medium} =~ /^\d+s$/; #- XXX remove medium name kludge
-}
+sub is_suppl { my ($self) = @_; $self->{issuppl} }
sub mark_suppl { my ($self) = @_; $self->{issuppl} = 1 }