summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_interactive.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-07-29 12:39:59 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-07-29 12:39:59 +0000
commit074de8adaf6e0d910899b7ee0f14066dcc050af7 (patch)
tree1b951142b3f0fe8d6231dd5c56af111261c5a214 /perl-install/install_steps_interactive.pm
parentbbd54ab4ee665a9afdf8642aa767bdbd608131c6 (diff)
downloaddrakx-074de8adaf6e0d910899b7ee0f14066dcc050af7.tar
drakx-074de8adaf6e0d910899b7ee0f14066dcc050af7.tar.gz
drakx-074de8adaf6e0d910899b7ee0f14066dcc050af7.tar.bz2
drakx-074de8adaf6e0d910899b7ee0f14066dcc050af7.tar.xz
drakx-074de8adaf6e0d910899b7ee0f14066dcc050af7.zip
ensure choosing install-or-upgrade can't be done twice
(since it's badly handled and hard to handle nicely)
Diffstat (limited to 'perl-install/install_steps_interactive.pm')
-rw-r--r--perl-install/install_steps_interactive.pm14
1 files changed, 8 insertions, 6 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 5e12e307b..a4882f294 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -231,6 +231,8 @@ sub selectInstallClass1 {
my ($o, $verif, $l, $def, $l2, $def2) = @_;
$verif->($o->ask_from_list(_("Install Class"), _("Which installation class do you want?"), $l, $def) || die 'already displayed');
+ return if !@$l2;
+
$::live ? 'Update' : $o->ask_from_list_(_("Install/Update"), _("Is this an install or an update?"), $l2, $def2);
}
@@ -253,12 +255,12 @@ sub selectInstallClass {
my $verifInstallClass = sub { $::expert = $c{$_[0]} eq "expert" };
my $installMode = $o->{isUpgrade} ? $o->{keepConfiguration} ? __("Upgrade packages only") : __("Upgrade") : __("Install");
- $installMode = $o->selectInstallClass1($verifInstallClass,
- first(list2kv(@c)), ${{reverse %c}}{$::expert ? "expert" : "beginner"},
- [ __("Install"), __("Upgrade"), __("Upgrade packages only") ], $installMode);
-
- $o->{isUpgrade} = $installMode =~ /Upgrade/;
- $o->{keepConfiguration} = $installMode =~ /packages only/;
+ if ($installMode = $o->selectInstallClass1($verifInstallClass,
+ first(list2kv(@c)), ${{reverse %c}}{$::expert ? "expert" : "beginner"},
+ exists $o->{isUpgrade} ? [] : [ __("Install"), __("Upgrade"), __("Upgrade packages only") ], $installMode)) {
+ $o->{isUpgrade} = $installMode =~ /Upgrade/;
+ $o->{keepConfiguration} = $installMode =~ /packages only/;
+ }
install_steps::selectInstallClass($o);
}