summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-08-27 00:53:21 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-08-27 00:53:21 +0000
commitabf226f6c9989b710c445fd09cfc8642d509c3a3 (patch)
tree3d268e7e1121f7fd993772ca173a048d3e6fe4b5 /perl-install
parent74771ce02bc62027d14eaa4a9a48ea03dd966425 (diff)
downloaddrakx-abf226f6c9989b710c445fd09cfc8642d509c3a3.tar
drakx-abf226f6c9989b710c445fd09cfc8642d509c3a3.tar.gz
drakx-abf226f6c9989b710c445fd09cfc8642d509c3a3.tar.bz2
drakx-abf226f6c9989b710c445fd09cfc8642d509c3a3.tar.xz
drakx-abf226f6c9989b710c445fd09cfc8642d509c3a3.zip
Support for multiple supplementary media
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install_any.pm19
1 files changed, 13 insertions, 6 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 64af3b059..4410aa947 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -363,15 +363,20 @@ sub preConfigureTimezone {
sub ask_if_suppl_media {
my ($o) = @_;
- my $suppl = $o->ask_from_list_(
- '', formatAlaTeX(
+ our $suppl_already_asked;
+ my $msg = $suppl_already_asked
+ ? N("Do you have further supplementary media?")
+ : formatAlaTeX(
#-PO: keep the double empty lines between sections, this is formatted a la LaTeX
- N("The following media have been found and will be used during install: %s.
+ N("The following media have been found and will be used during install: %s.
Do you have a supplementary installation media to configure?",
- join ", ", uniq(map { $_->{descr} } values %{$o->{packages}{mediums}}))
- ), [ N_("None"), N_("CD-ROM"), N_("Network (http)"), N_("Network (ftp)") ], 'None');
+ join ", ", uniq(map { $_->{descr} } values %{$o->{packages}{mediums}})));
+ my $suppl = $o->ask_from_list_(
+ '', $msg, [ N_("None"), N_("CD-ROM"), N_("Network (http)"), N_("Network (ftp)") ], 'None'
+ );
+ $suppl_already_asked = 1;
return $suppl;
}
@@ -389,7 +394,9 @@ sub selectSupplMedia {
'Network (ftp)' => 'ftp',
}->{$suppl};
#- by convention, the media names for suppl. CDs match /^\d+s$/
- my $medium_name = $suppl_method eq 'cdrom' ? '1s' : int(keys %{$o->{packages}{mediums}}) + 1;
+ 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;
local $::isWizard = 0;
local $o->{method} = $suppl_method;
if ($suppl_method eq 'cdrom') {