diff options
Diffstat (limited to 'lib/OpenSLX/DistroUtils/Engine.pm')
-rw-r--r-- | lib/OpenSLX/DistroUtils/Engine.pm | 10 |
1 files changed, 4 insertions, 6 deletions
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); |