summaryrefslogtreecommitdiffstats
path: root/perl-install/live_install2
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-03-12 15:18:34 +0000
committerFrancois Pons <fpons@mandriva.com>2001-03-12 15:18:34 +0000
commit18a5572ee8e3850f1d1f928d43d2e1799594dbd9 (patch)
treea8d7ff802b09c27d3cf3d169167fb4371836cba9 /perl-install/live_install2
parentece757a4920eb93a5eef727f710094c65b767118 (diff)
downloaddrakx-18a5572ee8e3850f1d1f928d43d2e1799594dbd9.tar
drakx-18a5572ee8e3850f1d1f928d43d2e1799594dbd9.tar.gz
drakx-18a5572ee8e3850f1d1f928d43d2e1799594dbd9.tar.bz2
drakx-18a5572ee8e3850f1d1f928d43d2e1799594dbd9.tar.xz
drakx-18a5572ee8e3850f1d1f928d43d2e1799594dbd9.zip
fixed live update between GLIBC 2.1 and GLIBC 2.2. should work for other
combination but not tested. fixed locale usage and gtk environment interaction (added LOCPATH, GCONV_PATH and GTK_EXE_PREFIX). created LD_LOADER environment variable to keep track of right ELF loader to be used for the GLIBC used by the live update. added internal PATH to LD_LIBRARY_PATH as ELF loader only check this one and not PATH.
Diffstat (limited to 'perl-install/live_install2')
-rwxr-xr-xperl-install/live_install222
1 files changed, 19 insertions, 3 deletions
diff --git a/perl-install/live_install2 b/perl-install/live_install2
index 6c0cb9ef5..6e4486e48 100755
--- a/perl-install/live_install2
+++ b/perl-install/live_install2
@@ -4,14 +4,30 @@ my $dir = `pwd`;
chomp $dir;
$dir .= "/../../..";
+#- 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/$_" } @INC;
-$ENV{LD_LIBRARY_PATH} = "$dir/lib:$dir/usr/lib:$dir/usr/lib/perl5/5.6.0/i386-linux/CORE";
+$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/5.6.0/i386-linux/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_EXE_PREFIX} = "$dir/usr";
+
+system $ENV{LD_LOADER}, "../perl", "-i", "-pe", "s,^(.*macrofiles[^/]*)(.*),\$1$dir/usr/lib/rpm/macros:\$2,", $ENV{RPMRC_FILE};
+system $ENV{LD_LOADER}, "../perl", "./install2", "--live", @ARGV;
-system "../../../lib/ld-linux.so.2", "../perl", "-i", "-pe", "s,(macrofiles:\\s*)(.*),$1$dir/usr/lib/rpm/macros:$2,", $ENV{RPMRC_FILE};
-system "../../../lib/ld-linux.so.2", "../perl", "./install2", "--live", @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};
$ENV{DISPLAY} and system "xset", "-fp", "/tmp/drakx/mdkinst/usr/X11R6/lib/X11/fonts/";
foreach (qw(misc PEX Speedo Type1 mdk 75dpi 100dpi cyrillic)) {