From 192bcb9921a8da1edf82bcf90d2d480d2a810518 Mon Sep 17 00:00:00 2001 From: Sebastian Schmelzer Date: Fri, 5 Jun 2009 14:50:07 +0000 Subject: quick fix distroutils TODO: add prefix /mnt only in chrooted environment see also Olli's mail on openslx-devel git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2934 95ad53e4-c205-0410-b2fa-d234c58c8868 --- lib/OpenSLX/DistroUtils/Engine.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/OpenSLX/DistroUtils/Engine.pm b/lib/OpenSLX/DistroUtils/Engine.pm index 2a369ca2..88a1f166 100644 --- a/lib/OpenSLX/DistroUtils/Engine.pm +++ b/lib/OpenSLX/DistroUtils/Engine.pm @@ -35,12 +35,10 @@ sub loadDistro { my $pathToClass = "$openslxConfig{'base-path'}/lib"; my $flags = {}; - if ($pathToClass) { - $flags->{incPaths} = [ $pathToClass ]; - # if you call this function inside a plugin's install method we have to add /mnt - # in front of the include path! - $flags->{incPaths} = [ "/mnt/$pathToClass" ]; - } + $flags->{incPaths} = [ $pathToClass, "/mnt/$pathToClass" ]; + # for the case we call this function inside the chrooted environment of a plugin's + # install method we add the corrected searchpath to INC + # TODO: fix this problem via plugin engine my $loaded = eval { $distro = instantiateClass("OpenSLX::DistroUtils::${distroName}", $flags); -- cgit v1.2.3-55-g7522