diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/do_pkgs.pm | 17 | ||||
-rw-r--r-- | perl-install/install_steps.pm | 4 | ||||
-rw-r--r-- | perl-install/interactive.pm | 9 |
3 files changed, 16 insertions, 14 deletions
diff --git a/perl-install/do_pkgs.pm b/perl-install/do_pkgs.pm index baf96b7f0..bbcacb620 100644 --- a/perl-install/do_pkgs.pm +++ b/perl-install/do_pkgs.pm @@ -1,4 +1,12 @@ package do_pkgs; # $Id$ + +sub do_pkgs { + my ($in) = @_; + ($::isInstall ? 'do_pkgs_during_install' : 'do_pkgs_standalone')->new($in); +} + +################################################################################ +package do_pkgs_common; use common; sub new { @@ -6,11 +14,6 @@ sub new { bless { in => $in }, $type; } -sub vnew { - my ($_type, $in) = @_; - ($::isInstall ? 'do_pkgs_during_install' : 'do_pkgs_standalone')->new($in); -} - sub ensure_is_installed { my ($do, $pkg, $file, $b_auto) = @_; @@ -36,7 +39,7 @@ package do_pkgs_during_install; use run_program; use common; -our @ISA = qw(do_pkgs); +our @ISA = qw(do_pkgs_common); sub new { my ($type, $in) = @_; @@ -118,7 +121,7 @@ use run_program; use common; use log; -our @ISA = qw(do_pkgs); +our @ISA = qw(do_pkgs_common); sub install { my ($do, @l) = @_; diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 25be3e91c..5d0b6ff94 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -2,7 +2,7 @@ package install_steps; # $Id$ use diagnostics; use strict; -use vars qw(@filesToSaveForUpgrade @filesNewerToUseAfterUpgrade @ISA); +use vars qw(@filesToSaveForUpgrade @filesNewerToUseAfterUpgrade); #-###################################################################################### #- misc imports @@ -22,6 +22,8 @@ use any; use log; use fs; +our @ISA = qw(do_pkgs); + @filesToSaveForUpgrade = qw( /etc/ld.so.conf /etc/fstab /etc/hosts /etc/conf.modules /etc/modules.conf ); diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index cb6f3c74a..b1d3c8034 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -8,6 +8,7 @@ use strict; #-###################################################################################### use MDK::Common::Func; use common; +use do_pkgs; #- minimal example using interactive: # @@ -77,6 +78,8 @@ use common; #-###################################################################################### #- OO Stuff #-###################################################################################### +our @ISA = qw(do_pkgs); + sub new($) { my ($type) = @_; @@ -119,12 +122,6 @@ sub resume {} sub end {} sub exit { exit($_[0]) } -sub do_pkgs { - my ($in) = @_; - require do_pkgs; - do_pkgs->vnew($in); -} - #-###################################################################################### #- Interactive functions #-###################################################################################### |