From 796cf283e1cca6e17bbb7b80a5f797ff862f9956 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Tue, 18 Aug 2009 19:32:27 +0000 Subject: Fixing an ugly bug Olli pointed out in r3096, r3097 ... git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@3099 95ad53e4-c205-0410-b2fa-d234c58c8868 --- installer/OpenSLX/OSSetup/Distro/Base.pm | 6 +++--- installer/OpenSLX/OSSetup/Engine.pm | 29 ++++++++++++++++++++++++----- 2 files changed, 27 insertions(+), 8 deletions(-) (limited to 'installer') diff --git a/installer/OpenSLX/OSSetup/Distro/Base.pm b/installer/OpenSLX/OSSetup/Distro/Base.pm index 93e2fcaa..15c0a963 100644 --- a/installer/OpenSLX/OSSetup/Distro/Base.pm +++ b/installer/OpenSLX/OSSetup/Distro/Base.pm @@ -1,4 +1,4 @@ -# Copyright (c) 2006, 2007 - OpenSLX GmbH +# Copyright (c) 2006..2009 - OpenSLX GmbH # # This program is free software distributed under the GPL version 2. # See http://openslx.org/COPYING @@ -223,9 +223,9 @@ sub getDefaultPathList sub addUclibLdconfig { my $self = shift; - my $ldpath = shift; + #my $ldpath = shift; - open(OUTFILE, ">", "$ldpath/etc/ld.so.conf.d/uclib.conf") + open(OUTFILE, ">", "/etc/ld.so.conf.d/uclib.conf") or die ("something went wrong"); print OUTFILE "/opt/openslx/uclib-rootfs/lib\n"; print OUTFILE "/opt/openslx/uclib-rootfs/usr/lib\n"; diff --git a/installer/OpenSLX/OSSetup/Engine.pm b/installer/OpenSLX/OSSetup/Engine.pm index 1a59b4c3..e4e36da5 100644 --- a/installer/OpenSLX/OSSetup/Engine.pm +++ b/installer/OpenSLX/OSSetup/Engine.pm @@ -265,8 +265,19 @@ sub installVendorOS ) ); + # add the uclibs and tools to the stage1 and add them to library search + # path $self->_copyUclibcRootfs(); - $self->{distro}->updateDistroConfig(); + callInSubprocess( + sub { + $self->_callChrootedFunction({ + chrootDir => $self->{'vendor-os-path'}, + function => sub { + $self->{'distro'}->addUclibLdconfig(); + }, + updateConfig => 1, + }); + }); $self->_touchVendorOS(); $self->addInstalledVendorOSToConfigDB(); return; @@ -349,9 +360,19 @@ sub cloneVendorOS ) ); } - + # add the uclibs and tools to the stage1 and add them to library search + # path $self->_copyUclibcRootfs(); - $self->{distro}->updateDistroConfig(); + callInSubprocess( + sub { + $self->_callChrootedFunction({ + chrootDir => $self->{'vendor-os-path'}, + function => sub { + $self->{'distro'}->addUclibLdconfig(); + }, + updateConfig => 1, + }); + }); $self->_touchVendorOS(); $self->addInstalledVendorOSToConfigDB(); return; @@ -1098,8 +1119,6 @@ sub _copyUclibcRootfs close($rsyncFH) or die _tr("unable to copy to target '%s', giving up! (%s)", $target, $!); - # add the uclibs to the ld.so.conf - $distro->addUclibLdconfig($targetRoot); # write version of uclibc-rootfs original into a file in order to be # able to check the up-to-date state later (in the config-demuxer) -- cgit v1.2.3-55-g7522