summaryrefslogtreecommitdiffstats
path: root/make_boot_img
diff options
context:
space:
mode:
Diffstat (limited to 'make_boot_img')
-rwxr-xr-xmake_boot_img10
1 files changed, 4 insertions, 6 deletions
diff --git a/make_boot_img b/make_boot_img
index 77be6aeda..bc87ffa0a 100755
--- a/make_boot_img
+++ b/make_boot_img
@@ -76,18 +76,16 @@ sub patch_pcmcia_config {
my @conf_contents = cat_("$pcmcia_root/pcmcia/config");
die "$pcmcia_root/pcmcia/config seems short\n" if listlength(@conf_contents) < 10;
- #- remove all modules with directories since we don't support that during install
- /\s+class.*module.*/ and s|"[^"]+/([^"]+)"|"$1"|g foreach @conf_contents;
-
#- adjust deps
foreach (cat_("all.modules/$main/modules.dep")) {
/^(\S+): (.*)/ and $deps{$1} = [ split ' ', $2 ] or die "could not understand `$_' in all.modules/$main/modules.dep\n";
}
foreach my $confline (@conf_contents) {
$confline =~ /class.*\s+module\s+(.*)/ or next;
- my @modules = map { /^\s*"([^"]+)"\s*$/ ? $1 : $_ } split ',', $1;
- my @modules_with_deps = map { @{$deps{$_}}, $_ } @modules;
- my $new_modz = join ', ', map { "\"$_\"" } uniq(difference2(\@modules_with_deps, \@ignore_modules_in_deps));
+ my @modules = map { /"([^"]+)"(.*)/ && [ $1, $2 ] } split ',', $1;
+ $_->[0] =~ s|.*/([^/]+)$|$1|g foreach @modules; #- remove directories since we don't support that during install
+ my @deps = grep { !member($_, @ignore_modules_in_deps, map { $_->[0] } @modules) } map { @{$deps{$_->[0]}} } @modules;
+ my $new_modz = join ', ', (map { "\"$_\"" } @deps), (map { "\"$_->[0]\"$_->[1]" } @modules);
$confline =~ s/(class.*\s+module\s+).*/$1$new_modz/;
}