diff options
author | Francois Pons <fpons@mandriva.com> | 2001-09-13 13:09:05 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2001-09-13 13:09:05 +0000 |
commit | b0a2c00ae78eb267724428d99a571b83ff32aaec (patch) | |
tree | 3ca4323304be83a67410e2098aaa7068d3e3726c | |
parent | 9825694557a783d3ab38ca3aec237105fd8cc5cc (diff) | |
download | drakx-backup-do-not-use-b0a2c00ae78eb267724428d99a571b83ff32aaec.tar drakx-backup-do-not-use-b0a2c00ae78eb267724428d99a571b83ff32aaec.tar.gz drakx-backup-do-not-use-b0a2c00ae78eb267724428d99a571b83ff32aaec.tar.bz2 drakx-backup-do-not-use-b0a2c00ae78eb267724428d99a571b83ff32aaec.tar.xz drakx-backup-do-not-use-b0a2c00ae78eb267724428d99a571b83ff32aaec.zip |
updated so that this scripts is running again.
-rwxr-xr-x | perl-install/g_auto_install | 49 |
1 files changed, 45 insertions, 4 deletions
diff --git a/perl-install/g_auto_install b/perl-install/g_auto_install index 871a15945..dd7655ee5 100755 --- a/perl-install/g_auto_install +++ b/perl-install/g_auto_install @@ -1,12 +1,53 @@ -#!../perl +#!/usr/bin/perl my $dir = `pwd`; chomp $dir; $dir .= "/../../.."; -$ENV{PERL5LIB} = join ":", map { "$dir/$_" } @INC; -$ENV{LD_LIBRARY_PATH} = "$dir/lib:$dir/usr/lib"; +#- 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}; -exec "../../../lib/ld-linux.so.2", "../perl", "./install2", "--g_auto_install", @ARGV or die; +if ($ENV{DISPLAY}) { + system "xset", "-fp", "$dir/usr/X11R6/lib/X11/fonts/"; + system "xset", "fp", "rehash"; +} |