summaryrefslogtreecommitdiffstats
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
parentbbd54ab4ee665a9afdf8642aa767bdbd608131c6 (diff)
downloaddrakx-backup-do-not-use-074de8adaf6e0d910899b7ee0f14066dcc050af7.tar
drakx-backup-do-not-use-074de8adaf6e0d910899b7ee0f14066dcc050af7.tar.gz
drakx-backup-do-not-use-074de8adaf6e0d910899b7ee0f14066dcc050af7.tar.bz2
drakx-backup-do-not-use-074de8adaf6e0d910899b7ee0f14066dcc050af7.tar.xz
drakx-backup-do-not-use-074de8adaf6e0d910899b7ee0f14066dcc050af7.zip
ensure choosing install-or-upgrade can't be done twice
(since it's badly handled and hard to handle nicely)
-rw-r--r--perl-install/install2.pm5
-rw-r--r--perl-install/install_steps_gtk.pm2
-rw-r--r--perl-install/install_steps_interactive.pm14
3 files changed, 10 insertions, 11 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 3fa29a897..0fd32cb32 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -40,7 +40,7 @@ $o = $::o = {
partitioning => { clearall => 0, eraseBadPartitions => 0, auto_allocate => 0 }, #-, readonly => 0 },
authentication => { md5 => 1, shadow => 1 },
lang => 'en_US',
- isUpgrade => 0,
+#- isUpgrade => 0,
toRemove => [],
toSave => [],
#- simple_themes => 1,
@@ -135,9 +135,6 @@ sub selectInstallClass {
installStepsCall($o, $auto, 'selectInstallClass', $clicked);
- if ($o->{steps}{choosePackages}{entered} >= 1 && !$o->{steps}{installPackages}{done}) {
- installStepsCall($o, $auto, 'setPackages', $o->{isUpgrade} && $ent_number == 1);
- }
if ($o->{isUpgrade}) {
@{$o->{orderedSteps}} = map { /setupSCSI/ ? ($_, "doPartitionDisks") : $_ }
grep { !/doPartitionDisks/ } @{$o->{orderedSteps}};
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 1ad27b7fe..ccfe6a53c 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -155,7 +155,7 @@ press `F1' when booting on CDROM, then enter `text'.")) if $first_time && availa
#------------------------------------------------------------------------------
sub selectInstallClass1 {
my ($o, $verif, $l, $def, $l2, $def2) = @_;
- $::live || @$l == 1 and return $o->SUPER::selectInstallClass1($verif, $l, $def, $l2, $def2);
+ $::live || @$l == 1 || !@$l2 and return $o->SUPER::selectInstallClass1($verif, $l, $def, $l2, $def2);
my $w = my_gtk->new(_("Install Class"));
my $focused;
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);
}