diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-01-12 13:51:42 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-01-12 13:51:42 +0000 |
commit | 0ab7ebe78a682d07010cd2242748c57346cca480 (patch) | |
tree | b6f016a69016f57047cc5ab44ba0766384e11410 /perl-install | |
parent | 08118de09b6b4c23db243e6eabef4236dcb213cc (diff) | |
download | drakx-backup-do-not-use-0ab7ebe78a682d07010cd2242748c57346cca480.tar drakx-backup-do-not-use-0ab7ebe78a682d07010cd2242748c57346cca480.tar.gz drakx-backup-do-not-use-0ab7ebe78a682d07010cd2242748c57346cca480.tar.bz2 drakx-backup-do-not-use-0ab7ebe78a682d07010cd2242748c57346cca480.tar.xz drakx-backup-do-not-use-0ab7ebe78a682d07010cd2242748c57346cca480.zip |
- install_steps_auto_install is not a interactive but still needs do_pkgs
- so making do_pkgs a class, and interactive and install_steps will inheritate from it
- do_pkgs renamed into do_pkgs_common, containing the things common to do_pkgs_during_install and do_pkgs_standalone
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 #-###################################################################################### |