From 17b65ec06df7108085989f2e0398e1b834cd0358 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Mon, 13 Aug 2001 19:06:50 +0000 Subject: initial revision for drakautoinst - put %installSteps in a separate package (steps.pm) (for drakxtools) - use additional fields {auto} and {noauto}, by step, to ease interactive auto install and oem stuff - in install2.pm, perform each step either from the interactive class or from install_steps, according to the {auto} flag - id, tell each step to not try to be automatic if {noauto} - in the install, have auto install bootdisk created in install_any so we can always write a bootdisk (from install_steps) for further use from drakautoinst in standalone - interactive version of install_steps_auto_install is now inheriting from the interactive class, so we can click on a previous automatic step and have it interactively during an interactive auto install --- perl-install/install_steps_auto_install.pm | 32 +++++++++++------------------- 1 file changed, 12 insertions(+), 20 deletions(-) (limited to 'perl-install/install_steps_auto_install.pm') diff --git a/perl-install/install_steps_auto_install.pm b/perl-install/install_steps_auto_install.pm index 4e48dc8a5..a7870240d 100644 --- a/perl-install/install_steps_auto_install.pm +++ b/perl-install/install_steps_auto_install.pm @@ -23,31 +23,22 @@ sub new { # Handle legacy options $o->{interactive} ||= 'gtk' if $graphical || !is_empty_array_ref($o->{interactiveSteps}); $o->{interactiveSteps} ||= [ @graphical_steps ]; - push @{$o->{interactiveSteps}}, qw(enteringStep formatMountPartitions beforeInstallPackages installPackages); + push @{$o->{interactiveSteps}}, qw(formatPartitions installPackages); if ($o->{interactive}) { - push @ISA, "interactive_$o->{interactive}"; - my $interactiveClass = "install_steps_$o->{interactive}"; require"$interactiveClass.pm"; #- no space to skip perl2fcalls - #- remove the empty wait_message - undef *wait_message; - - foreach my $f (@{$o->{interactiveSteps}}) { - foreach my $pkg ($interactiveClass, 'install_steps_interactive') { - if ($::{$pkg . "::"}{$f}) { - log::l("install_steps_auto_install: adding function ", $pkg, "::", $f); - - no strict 'refs'; - *{"install_steps_auto_install::$f"} = sub { - local @ISA = ($interactiveClass, @ISA); - &{$::{$pkg . "::"}{$f}}; - }; - last; - } - } - } + @ISA = ($interactiveClass, @ISA); + + #- remove our non-interactive stuff + eval "undef *$_" foreach qw(configureNetwork enteringStep ask_warn wait_message errorInStep installPackages); + + my $f = $o->{steps}{first}; + do { + member($f, @{$o->{interactiveSteps}}) ? $o->{steps}{$f}{noauto} = 1 : $o->{steps}{$f}{auto} = 1; + } while ($f = $o->{steps}{$f}{next}); + goto &{$::{$interactiveClass . "::"}{new}}; } else { (bless {}, ref $type || $type)->SUPER::new($o); @@ -69,6 +60,7 @@ sub enteringStep { sub ask_warn { log::l(ref $_[1] ? join " ", @{$_[1]} : $_[1]); } + sub wait_message {} sub errorInStep { -- cgit v1.2.1