From 04a6844b8cc01a5f5a0bbd41213f51c821484f26 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Mon, 30 Mar 2009 21:51:25 +0000 Subject: 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 --- boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm') 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 -- cgit v1.2.3-55-g7522