summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/modules.pm21
1 files changed, 11 insertions, 10 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index cb4d2ae2e..4a96caf9f 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -25,17 +25,17 @@ sub category2modules_and_description {
map { $_ => $modules_descriptions{$_} } category2modules($categories);
}
-%mappings_24_26 = ("usb-ohci" => "ohci-hcd",
- "usb-uhci" => "uhci-hcd",
- "uhci" => "uhci-hcd",
- "printer" => "usblp",
- "bcm4400" => "b44",
- "3c559" => "3c359",
- "3c90x" => "3c59x",
- "dc395x_trm" => "dc395x");
+%mappings_24_26 = ("usb-ohci" => [ "ohci-hcd" ],
+ "usb-uhci" => [ "uhci-hcd" ],
+ "uhci" => [ "uhci-hcd" ],
+ "printer" => [ "usblp" ],
+ "bcm4400" => [ "b44", "bcm4400" ],
+ "3c559" => [ "3c359" ],
+ "3c90x" => [ "3c59x" ],
+ "dc395x_trm" => [ "dc395x" ]);
%mappings_26_24 = reverse %mappings_24_26;
sub mapping_24_26 {
- return map { c::kernel_version() =~ /^\Q2.6/ ? $mappings_24_26{$_} || $_ : $_ } @_;
+ map { c::kernel_version() =~ /^\Q2.6/ ? $mappings_24_26{$_} || [ $_ ] : [ $_ ] } @_;
}
sub mapping_26_24 {
my ($modname) = @_;
@@ -60,7 +60,8 @@ sub load {
my @l = map {
my ($name, @options) = ref($_) ? @$_ : $_;
$options{$name} = \@options;
- dependencies_closure(mapping_24_26($name));
+ my ($a) = mapping_24_26($name);
+ map { dependencies_closure($_) } @$a;
} @_;
@l = difference2([ uniq(@l) ], [ map { my $s = $_; $s =~ s/_/-/g; $s, $_ } loaded_modules() ]) or return;