aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Iurt/DKMS.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-02-12 01:48:45 +0000
committerOlivier Blin <oblin@mandriva.com>2008-02-12 01:48:45 +0000
commit51e82cc75775386901cade70a429689beee801c5 (patch)
tree49f0410ce772e2341c7122bf0af85fcce46db146 /lib/Iurt/DKMS.pm
parent668c64ae454336724466a7affee732d4d8b12b7f (diff)
downloadiurt-51e82cc75775386901cade70a429689beee801c5.tar
iurt-51e82cc75775386901cade70a429689beee801c5.tar.gz
iurt-51e82cc75775386901cade70a429689beee801c5.tar.bz2
iurt-51e82cc75775386901cade70a429689beee801c5.tar.xz
iurt-51e82cc75775386901cade70a429689beee801c5.zip
allow to specify kernel for which DKMS packages should be rebuilt
Diffstat (limited to 'lib/Iurt/DKMS.pm')
-rw-r--r--lib/Iurt/DKMS.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Iurt/DKMS.pm b/lib/Iurt/DKMS.pm
index 81a4619..e5a8b95 100644
--- a/lib/Iurt/DKMS.pm
+++ b/lib/Iurt/DKMS.pm
@@ -83,9 +83,11 @@ sub search_dkms {
} elsif ($rpm =~ /^kernel-((?:[^-]+-)?[^-]+.*)-[^-]+-[^-]+\.[^.]+\.rpm/ && $rpm !~ /win4lin|latest|debug|stripped|BOOT|xen|doc/) {
# we do not check for kernel in this media
$kmedia_ok or next;
+ my $version = $1;
+ my $package_ok = $run->{dkms}{kversion} ? $version =~ /$run->{dkms}{kversion}/ : 1;
+ $package_ok or next;
my $hdr = RPM4::Header->new("$path/$rpm");
my $files = $hdr->queryformat('[%{FILENAMES} ])');
- my $version = $1;
if ($version =~ /(.*)source-(.*)/ || $version =~ /(.*)devel-(.*)/) {
my $source = "$1$2";
my ($sourcedir) = $files =~ m, /usr/src/([^/ ]+),;