From 1e00a512393b4630fc9dba1dba051fa64c0ccd30 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 6 Jan 2004 16:12:52 +0000 Subject: get rid of g_auto_install (unused & not working) --- perl-install/Makefile | 1 - perl-install/g_auto_install | 53 ------------------------------- perl-install/install2.pm | 14 +++----- perl-install/install_any.pm | 2 +- perl-install/install_steps.pm | 11 +++---- perl-install/install_steps_interactive.pm | 4 +-- perl-install/pkgs.pm | 4 +-- 7 files changed, 13 insertions(+), 76 deletions(-) delete mode 100755 perl-install/g_auto_install (limited to 'perl-install') diff --git a/perl-install/Makefile b/perl-install/Makefile index 3cec2cc0b..73553eb71 100644 --- a/perl-install/Makefile +++ b/perl-install/Makefile @@ -77,7 +77,6 @@ install_pms: $(DIRS) cp share/*.rc $(DESTREP4PMS) chmod a+x $(DESTREP4PMS)/install2 chmod a+x $(DESTREP4PMS)/commands - chmod a+x $(DESTREP4PMS)/g_auto_install chmod a+x $(DESTREP4PMS)/live_install* mo_files : $(MOFILES) diff --git a/perl-install/g_auto_install b/perl-install/g_auto_install deleted file mode 100755 index dd7655ee5..000000000 --- a/perl-install/g_auto_install +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/perl - -my $dir = `pwd`; -chomp $dir; -$dir .= "/../../.."; - -#- avoid polluting environment with specific locales. -delete $ENV{$_} foreach qw(LC_MONETARY LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME LC_COLLATE LANGUAGE LANG RPM_INSTALL_LANG); - -if ($ENV{DISPLAY}) { - system "xset", "+fp", "$dir/usr/X11R6/lib/X11/fonts/"; - system "xset", "fp", "rehash"; -} - -#- perl version of the install, we use directly the version we found, -#- this means there SHOULD BE no module compiled for an older version of perl -#- which will be used by DrakX. -my ($version, $arch) = (glob "$dir/usr/lib/perl5/*/*/CORE/libperl.so")[0] =~ m|$dir/usr/lib/perl5/([^/]*)/([^/]*)/CORE/libperl.so|; - -#- keep it mind the ELF loader to use. -$ENV{LD_LOADER} = "$dir/lib/ld-linux.so.2"; - -$ENV{LOCPATH}="$dir/usr/share/locale"; -$ENV{GCONV_PATH}="$dir/usr/lib/gconv"; -$ENV{PERL5LIB} = join ":", map { "$dir/usr/lib/perl5/$_" } ("$version/$arch", - "$version", - "site_perl/$version/$arch", - "site_perl/$version", - "site_perl"); -$ENV{LD_LIBRARY_PATH} = "$dir/usr/bin:$dir/bin:$dir/sbin:$dir/usr/sbin:$dir/usr/X11R6/bin:$dir/lib:$dir/usr/lib:$dir/usr/lib/perl5/$version/$arch/CORE"; -$ENV{PATH} = join(":", map { "$dir/$_" } split ":", "/usr/bin:/bin:/sbin:/usr/sbin:/usr/X11R6/bin") . ":$ENV{PATH}"; -$ENV{SHARE_PATH} = "$dir/usr/share"; -$ENV{RPMRC_FILE} = "$dir/usr/lib/rpm/rpmrc"; -$ENV{GTK_DATA_PREFIX} = "$dir/usr"; -$ENV{GTK_EXE_PREFIX} = "$dir/usr"; -$ENV{GDK_IMLIB_PATH} = "$dir/usr/lib"; - -system $ENV{LD_LOADER}, "../perl", "./install2", "--g_auto_install", @ARGV; - -#- at this point, unwind above else they will not run correctly (wrong ld-linux.so.2) -delete $ENV{GTK_EXE_PREFIX}; -delete $ENV{RPMRC_FILE}; -delete $ENV{LOCPATH}; -delete $ENV{SHARE_PATH}; -delete $ENV{PATH}; -delete $ENV{LD_LIBRARY_PATH}; -delete $ENV{PERL5LIB}; -delete $ENV{LD_LOADER}; - -if ($ENV{DISPLAY}) { - system "xset", "-fp", "$dir/usr/X11R6/lib/X11/fonts/"; - system "xset", "fp", "rehash"; -} diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 3226fa86a..10bca278a 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -114,7 +114,7 @@ sub selectMouse { sub setupSCSI { my ($clicked, $_ent_number, $auto) = @_; - if (!$::live && !$::g_auto_install && !$o->{blank} && !$::testing && !$::uml_install) { + if (!$o->{blank} && !$::testing && !$::uml_install) { -d '/lib/modules/' . c::kernel_version() || -s modules::cz_file() or die \N("Can't access kernel modules corresponding to your kernel (file %s is missing), this generally means your boot floppy in not in sync with the Installation medium (please create a newer boot floppy)", modules::cz_file()); } @@ -273,7 +273,7 @@ sub addUser { #------------------------------------------------------------------------------ sub setupBootloader { my ($_clicked, $ent_number, $auto) = @_; - return if $::g_auto_install || $::uml_install; + return if $::uml_install; modules::write_conf(); @@ -335,7 +335,7 @@ sub main { $::isInstall = 1; $::isWizard = 1; $::no_ugtk_init = 1; - $::expert = $::g_auto_install = 0; + $::expert = 0; #- c::unlimit_core() unless $::testing; @@ -393,7 +393,6 @@ sub main { useless_thing_accepted => sub { $o->{useless_thing_accepted} = 1 }, alawindows => sub { $o->{security} = 0; $o->{partitioning}{clearall} = 1; $o->{bootloader}{crushMbr} = 1 }, fdisk => sub { $o->{partitioning}{fdisk} = 1 }, - g_auto_install => sub { $::testing = $::g_auto_install = 1; $o->{partitioning}{auto_allocate} = 1 }, nomouseprobe => sub { $o->{nomouseprobe} = $v }, blank => sub { $o->{blank} = $::blank = 1 }, updatemodules => sub { $o->{updatemodules} = 1 }, @@ -409,11 +408,6 @@ sub main { } undef $::auto_install if $cfg; - if ($::g_auto_install) { - (my $root = `/bin/pwd`) =~ s|(/[^/]*){5}$||; - symlinkf $root, "/tmp/image" or die "unable to create link /tmp/image"; - $o->{method} ||= "cdrom"; - } if (!$::testing && !$::live) { symlink "rhimage", "/tmp/image"; #- for compatibility with old stage1 unlink $_ foreach "/modules/modules.mar", "/sbin/stage1"; @@ -434,7 +428,7 @@ sub main { #- make sure we don't pick up any gunk from the outside world my $remote_path = "$o->{prefix}/sbin:$o->{prefix}/bin:$o->{prefix}/usr/sbin:$o->{prefix}/usr/bin:$o->{prefix}/usr/X11R6/bin"; - $ENV{PATH} = "/usr/bin:/bin:/sbin:/usr/sbin:/usr/X11R6/bin:$remote_path" unless $::g_auto_install; + $ENV{PATH} = "/usr/bin:/bin:/sbin:/usr/sbin:/usr/X11R6/bin:$remote_path"; eval { spawnShell() }; diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 423cf14f1..d7f180123 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -643,7 +643,7 @@ sub kdemove_desktop_file { #-############################################################################### #- auto_install stuff #-############################################################################### -sub auto_inst_file() { ($::g_auto_install ? "/tmp" : "$::prefix/root/drakx") . "/auto_inst.cfg.pl" } +sub auto_inst_file() { "$::prefix/root/drakx/auto_inst.cfg.pl" } sub report_bug { my ($prefix) = @_; diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index a35543864..04d65a817 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -118,10 +118,10 @@ sub selectLanguage { addToBeDone { lang::write_langs($o->{prefix}, $o->{locale}{langs}); - } 'formatPartitions' unless $::g_auto_install; + } 'formatPartitions'; addToBeDone { lang::write($o->{prefix}, $o->{locale}); - } 'installPackages' unless $::g_auto_install; + } 'installPackages'; } #------------------------------------------------------------------------------ sub selectKeyboard { @@ -131,7 +131,7 @@ sub selectKeyboard { addToBeDone { keyboard::write($o->{keyboard}); - } 'installPackages' if !$::g_auto_install && (!$o->{isUpgrade} || !$o->{keyboard}{unsafe}); + } 'installPackages' if !$o->{isUpgrade} || !$o->{keyboard}{unsafe}; if ($o->{raw_X}) { require Xconfig::default; @@ -387,7 +387,7 @@ sub installPackages($$) { #- complete REWORK, TODO and TOCHECK! any::writeandclean_ldsoconf($o->{prefix}); delete $ENV{DURING_INSTALL}; - run_program::rooted_or_die($o->{prefix}, 'ldconfig') unless $::g_auto_install; + run_program::rooted_or_die($o->{prefix}, 'ldconfig'); log::l("Install took: ", formatTimeRaw(time() - $time)); install_any::log_sizes($o); scalar(@toInstall); #- return number of packages installed. @@ -396,8 +396,6 @@ sub installPackages($$) { #- complete REWORK, TODO and TOCHECK! sub afterInstallPackages($) { my ($o) = @_; - return if $::g_auto_install; - die \N("Some important packages didn't get installed properly. Either your cdrom drive or your cdrom is defective. Check the cdrom on an installed computer using \"rpm -qpl Mandrake/RPMS/*.rpm\" @@ -859,7 +857,6 @@ sub setupBootloaderBefore { sub setupBootloader { my ($o) = @_; - return if $::g_auto_install; require bootloader; bootloader::install($o->{bootloader}, $o->{fstab}, $o->{all_hds}{hds}); diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 4f41f8b0c..d30433d08 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -821,7 +821,7 @@ sub configureTimezone { my ($o, $clicked) = @_; require timezone; - $o->{timezone}{timezone} = $o->ask_from_treelist('', N("Which is your timezone?"), '/', [ timezone::getTimeZones($::g_auto_install ? '' : $o->{prefix}) ], $o->{timezone}{timezone}) || return; + $o->{timezone}{timezone} = $o->ask_from_treelist('', N("Which is your timezone?"), '/', [ timezone::getTimeZones($o->{prefix}) ], $o->{timezone}{timezone}) || return; my $ntp = to_bool($o->{timezone}{ntp}); $o->ask_from_({ interactive_help_id => 'configureTimezoneGMT' }, [ @@ -1300,7 +1300,7 @@ You may prefer to replay the installation. }, advanced => 1 }, { val => \ (my $_t2 = N("Save packages selection")), clicked => sub { install_any::g_default_packages($o) }, advanced => 1 }, ] - ) if $alldone && !$::g_auto_install; + ) if $alldone; } diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 2f7f62ce9..fb2960042 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -939,7 +939,7 @@ sub install($$$;$$) { delete $packages->{rpmdb}; #- make sure rpmdb is closed before. - return if $::g_auto_install || !scalar(@$toInstall); + return if !@$toInstall; #- for root loopback'ed /boot my $loop_boot = loopback::prepare_boot(); @@ -1159,7 +1159,7 @@ sub remove { delete $packages->{rpmdb}; #- make sure rpmdb is closed before. - return if $::g_auto_install || !@{$toRemove || []}; + return if !@{$toRemove || []}; my $db = rpmDbOpenForInstall($prefix) or die "error opening RPM database: ", c::rpmErrorString(); my $trans = $db->create_transaction($prefix); -- cgit v1.2.1