summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-04-05 17:52:15 +0000
committerOlivier Blin <oblin@mandriva.org>2005-04-05 17:52:15 +0000
commit5497f868214757ac6ae67c438124345a666efeed (patch)
treead784a9b5d410769049cb1c5c161b9f6ea06f280 /perl-install
parentf9d763a52281f46f4e3bd9d58918e2b7057d8eee (diff)
downloaddrakx-5497f868214757ac6ae67c438124345a666efeed.tar
drakx-5497f868214757ac6ae67c438124345a666efeed.tar.gz
drakx-5497f868214757ac6ae67c438124345a666efeed.tar.bz2
drakx-5497f868214757ac6ae67c438124345a666efeed.tar.xz
drakx-5497f868214757ac6ae67c438124345a666efeed.zip
install dkms packages if found
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/do_pkgs.pm13
1 files changed, 8 insertions, 5 deletions
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 ];
}
################################################################################