summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-10-15 14:23:53 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-10-15 14:23:53 +0000
commit4bb042efd8ca9b9cf5f40e66187d9708877a79a5 (patch)
treed31249d416edb76dfe71cef533f062d63a2b8290
parent1aec68c262a3ba595d7153f15d0419f5b3083394 (diff)
downloaddrakx-backup-do-not-use-4bb042efd8ca9b9cf5f40e66187d9708877a79a5.tar
drakx-backup-do-not-use-4bb042efd8ca9b9cf5f40e66187d9708877a79a5.tar.gz
drakx-backup-do-not-use-4bb042efd8ca9b9cf5f40e66187d9708877a79a5.tar.bz2
drakx-backup-do-not-use-4bb042efd8ca9b9cf5f40e66187d9708877a79a5.tar.xz
drakx-backup-do-not-use-4bb042efd8ca9b9cf5f40e66187d9708877a79a5.zip
drop field {next} in {steps} since it is duplicated in orderedSteps
=> it allows simpler modification of orderedSteps (as already done in upgrade) for mandrake move
-rw-r--r--perl-install/install2.pm4
-rw-r--r--perl-install/install_any.pm4
-rw-r--r--perl-install/install_steps.pm2
-rw-r--r--perl-install/install_steps_auto_install.pm2
-rw-r--r--perl-install/steps.pm1
5 files changed, 3 insertions, 10 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index cdba1e737..6bbfb514b 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -142,10 +142,6 @@ sub selectInstallClass {
if ($o->{isUpgrade}) {
$o->{keepConfiguration} and @{$o->{orderedSteps}} = grep { !/selectMouse|selectKeyboard|miscellaneous|setRootPassword|addUser|configureNetwork|installUpdates|summary|configureServices|configureX/ } @{$o->{orderedSteps}};
- my $s; foreach (@{$o->{orderedSteps}}) {
- $s->{next} = $_ if $s;
- $s = $o->{steps}{$_};
- }
}
}
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 61a50d50f..d3b9db89b 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -193,9 +193,7 @@ sub clean_postinstall_rpms() {
#- Functions
#-######################################################################################
sub getNextStep() {
- my ($s) = $::o->{steps}{first};
- $s = $::o->{steps}{$s}{next} while $::o->{steps}{$s}{done} || !$::o->{steps}{$s}{reachable};
- $s;
+ find { !$::o->{steps}{$_}{done} && $::o->{steps}{$_}{reachable} } @{$::o->{orderedSteps}}
}
sub spawnShell() {
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 6833b3b83..9a95e2648 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -56,7 +56,7 @@ sub leavingStep {
output(install_any::auto_inst_file(), install_any::g_auto_install(1));
}
- for (my $s = $o->{steps}{first}; $s; $s = $o->{steps}{$s}{next}) {
+ foreach my $s (@{$o->{orderedSteps}}) {
#- the reachability property must be recomputed each time to take
#- into account failed step.
next if $o->{steps}{$s}{done} && !$o->{steps}{$s}{redoable};
diff --git a/perl-install/install_steps_auto_install.pm b/perl-install/install_steps_auto_install.pm
index e83b34267..2c89ffbad 100644
--- a/perl-install/install_steps_auto_install.pm
+++ b/perl-install/install_steps_auto_install.pm
@@ -25,7 +25,7 @@ sub new {
@ISA = ($interactiveClass, @ISA);
- for (my $f = $o->{steps}{first}; $f; $f = $o->{steps}{$f}{next}) {
+ foreach my $f (@{$o->{orderedSteps}}) {
my $auto_name = member($f, @{$o->{interactiveSteps}}) ? 'noauto' : 'auto';
$o->{steps}{$f}{$auto_name} = 1;
}
diff --git a/perl-install/steps.pm b/perl-install/steps.pm
index 4aa8a09a9..82eb8d8a6 100644
--- a/perl-install/steps.pm
+++ b/perl-install/steps.pm
@@ -34,7 +34,6 @@ use common;
);
for (my $i = 0; $i < @installSteps; $i += 2) {
my %h; @h{@installStepsFields} = @{ $installSteps[$i + 1] };
- $h{next} = $installSteps[$i + 2];
$h{entered} = 0;
$h{onError} = $installSteps[$i + 2 * $h{onError}];
$h{reachable} = !$h{needs};