From 5497f868214757ac6ae67c438124345a666efeed Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 5 Apr 2005 17:52:15 +0000 Subject: install dkms packages if found --- perl-install/do_pkgs.pm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'perl-install/do_pkgs.pm') diff --git a/perl-install/do_pkgs.pm b/perl-install/do_pkgs.pm index 0bf8fedd8..0b2c23fa4 100644 --- a/perl-install/do_pkgs.pm +++ b/perl-install/do_pkgs.pm @@ -60,14 +60,17 @@ sub check_kernel_module_packages { my ($do, $base_name, $o_ext_name) = @_; require bootloader; - my @l = map { $base_name . '-' . bootloader::vmlinuz2version($_) } bootloader::installed_vmlinuz(); - my @ext = if_($o_ext_name, $o_ext_name); - my @rpms = $do->are_available(@ext, @l); + my ($short_name) = $base_name =~ /^(.*)-kernel$/; + my @rpms = $do->are_available("dkms-$short_name", + map { + $base_name . '-' . bootloader::vmlinuz2version($_); + } bootloader::installed_vmlinuz()); + my @ext = if_($o_ext_name, $do->are_available($o_ext_name)); - log::l("found kernel module packages $_") foreach @rpms; + log::l("found kernel module packages $_") foreach @rpms, @ext; #- we want at least a kernel package and the ext package if specified - @rpms > @ext && \@rpms; + @rpms && (!$o_ext_name || @ext) && [ @rpms, @ext ]; } ################################################################################ -- cgit v1.2.1