diff options
author | Christophe Fergeau <cfergeau@mandriva.com> | 2009-02-10 18:07:00 +0000 |
---|---|---|
committer | Christophe Fergeau <cfergeau@mandriva.com> | 2009-02-10 18:07:00 +0000 |
commit | 32edfb0586bfb529616df3ac2b4135dbdacf503f (patch) | |
tree | 046e5f11b013e7ddd42f86bc853638ad6ae2eb47 /kernel/list_modules.pm | |
parent | 04e90b83758bb809f10e610c95ece9576d05f30d (diff) | |
download | drakx-32edfb0586bfb529616df3ac2b4135dbdacf503f.tar drakx-32edfb0586bfb529616df3ac2b4135dbdacf503f.tar.gz drakx-32edfb0586bfb529616df3ac2b4135dbdacf503f.tar.bz2 drakx-32edfb0586bfb529616df3ac2b4135dbdacf503f.tar.xz drakx-32edfb0586bfb529616df3ac2b4135dbdacf503f.zip |
Handle relative paths in modules.dep
Diffstat (limited to 'kernel/list_modules.pm')
-rw-r--r-- | kernel/list_modules.pm | 10 |
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; } } |