summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/list_modules.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/list_modules.pm b/kernel/list_modules.pm
index 71b487de8..ef7fae4c5 100644
--- a/kernel/list_modules.pm
+++ b/kernel/list_modules.pm
@@ -288,10 +288,10 @@ our %l = (
my %moddeps;
sub load_dependencies {
- my ($file) = @_;
+ my ($file, $o_root) = @_;
%moddeps = ();
- foreach (cat_($file)) {
+ foreach (cat_($o_root . $file)) {
my ($m, $d) = split ':';
my $path = $m;
my ($filename, @fdeps) = map {
@@ -300,9 +300,15 @@ sub load_dependencies {
s!\.gz!!g;
$_;
} $m, split(' ', $d);
+
my ($modname, @deps) = map { filename2modname($_) } $filename, @fdeps;
$moddeps{$modname}{deps} = \@deps;
$moddeps{$modname}{filename} = $filename;
+ if (!begins_with($path, "/")) {
+ #- with newer module-init-tools, modules.dep can contain
+ #- relative paths
+ $path = dirname($file).'/'.$path;
+ }
$moddeps{$modname}{path} = $path;
}
}