diff options
Diffstat (limited to 'perl-install/modules.pm')
-rw-r--r-- | perl-install/modules.pm | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm index 638bebd5b..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; @@ -318,7 +319,7 @@ sub write_conf() { } my @l; push @l, 'scsi_hostadapter' if !is_empty_array_ref($conf{scsi_hostadapter}{probeall}); - push @l, grep { detect_devices::matching_driver('^$_$') } qw(bttv cx8800 saa7134); + push @l, grep { detect_devices::matching_driver("^$_\$") } qw(bttv cx8800 saa7134); my @l_26 = @l; if (my ($agp) = probe_category('various/agpgart')) { push @l_26, $agp->{driver}; |