summaryrefslogtreecommitdiffstats
path: root/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
diff options
context:
space:
mode:
authorOliver Tappe2009-03-30 23:51:25 +0200
committerOliver Tappe2009-03-30 23:51:25 +0200
commit04a6844b8cc01a5f5a0bbd41213f51c821484f26 (patch)
tree1415072cf1ede341e2803751a22404cb950b09d7 /boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
parentTrying to add Ubuntu-9.04 (for the sake of documentation in the wiki), (diff)
downloadcore-04a6844b8cc01a5f5a0bbd41213f51c821484f26.tar.gz
core-04a6844b8cc01a5f5a0bbd41213f51c821484f26.tar.xz
core-04a6844b8cc01a5f5a0bbd41213f51c821484f26.zip
fixes #406:
* ubuntu-9.04 doesn't contain absolute paths in its modules.dep but relative ones - we now compensate git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2771 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm')
-rw-r--r--boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm17
1 files changed, 16 insertions, 1 deletions
diff --git a/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm b/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
index e6e7155e..24453b23 100644
--- a/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
+++ b/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
@@ -199,12 +199,27 @@ sub _copyKernelModules
foreach my $modulesDep (@modulesDep) {
next if $modulesDep !~ m{^(.+?)/([^/]+)\.ko:\s*(.*?)\s*$};
my $path = $1;
+ if (substr($path, 0, 5) ne '/lib/') {
+ # some distros (e.g. ubuntu-9) use a local path instead of an
+ # absolute path, we need to make it absolute:
+ $path = "/lib/modules/$self->{'kernel-version'}/$path";
+ }
my $module = $2;
my $dependentsList = $3;
my $fullModulePath = "$path/$module.ko";
$modulePath{$module} = [] if !exists $modulePath{$module};
push @{$modulePath{$module}}, $fullModulePath;
- $dependentModules{$fullModulePath} = [ split ' ', $dependentsList ];
+ $dependentModules{$fullModulePath} = [
+ map {
+ if (substr($_, 0, 5) ne '/lib/') {
+ # some distros (e.g. ubuntu-9) use a local path instead of an
+ # absolute path, we need to make it absolute:
+ $_ = "/lib/modules/$self->{'kernel-version'}/$_";
+ }
+ $_;
+ }
+ split ' ', $dependentsList
+ ];
}
my $targetPath