summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_interactive.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-05-03 20:39:54 +0000
committerFrancois Pons <fpons@mandriva.com>2000-05-03 20:39:54 +0000
commit88d33875b772a7ade8f61658233f04b7c4bb43c8 (patch)
tree34173c6895158285b4f23e2c55e485aeb1c56578 /perl-install/install_steps_interactive.pm
parent106949dcae76303b7a9593083352781ee4a54242 (diff)
downloaddrakx-backup-do-not-use-88d33875b772a7ade8f61658233f04b7c4bb43c8.tar
drakx-backup-do-not-use-88d33875b772a7ade8f61658233f04b7c4bb43c8.tar.gz
drakx-backup-do-not-use-88d33875b772a7ade8f61658233f04b7c4bb43c8.tar.bz2
drakx-backup-do-not-use-88d33875b772a7ade8f61658233f04b7c4bb43c8.tar.xz
drakx-backup-do-not-use-88d33875b772a7ade8f61658233f04b7c4bb43c8.zip
*** empty log message ***
Diffstat (limited to 'perl-install/install_steps_interactive.pm')
-rw-r--r--perl-install/install_steps_interactive.pm22
1 files changed, 19 insertions, 3 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 0ddecb4ea..2e6df5371 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -339,22 +339,38 @@ sub chooseGroups {
sub chooseCD {
my ($o, $packages) = @_;
my @mediums = grep { $_ > 1 } pkgs::allMediums($packages);
+ my @mediumsDescr = ();
+ my %mediumsDescr = ();
#- if no other medium available or a poor beginner, we are choosing for him!
#- note first CD is always selected and should not be unselected!
return if scalar(@mediums) == 0 || $::beginner;
+ #- build mediumDescr according to mediums, this avoid asking multiple times
+ #- all the medium grouped together on only one CD.
+ foreach (@mediums) {
+ my $descr = pkgs::mediumDescr($packages, $_);
+ exists $mediumsDescr{$descr} or push @mediumsDescr, $descr;
+ $mediumsDescr{$descr} ||= $packages->[2]{$_}{selected};
+ }
+
$o->set_help('chooseCD');
$o->ask_many_from_list_ref('',
_("If you have all the CDs in the list below, click Ok.
If you have none of those CDs, click Cancel.
If only some CDs are missing, unselect them, then click Ok."),
- [ map { _("Cd-Rom labeled \"%s\"", pkgs::mediumDescr($packages, $_)) } @mediums ],
- [ map { \$packages->[2]{$_}{selected} } @mediums ]
+ [ map { _("Cd-Rom labeled \"%s\"", $_) } @mediumsDescr ],
+ [ map { \$mediumsDescr{$_} } @mediumsDescr ]
) or do {
- map { $packages->[2]{$_}{selected} = 0 } @mediums; #- force unselection of other CDs.
+ map { $mediumsDescr{$_} = 0 } @mediumsDescr; #- force unselection of other CDs.
};
$o->set_help('choosePackages');
+
+ #- restore true selection of medium (which may have been grouped together)
+ foreach (@mediums) {
+ my $descr = pkgs::mediumDescr($packages, $_);
+ $packages->[2]{$_}{selected} = $mediumsDescr{$descr};
+ }
}
#------------------------------------------------------------------------------