diff options
-rwxr-xr-x | iurt2 | 3 | ||||
-rw-r--r-- | lib/Iurt/DKMS.pm | 4 |
2 files changed, 6 insertions, 1 deletions
@@ -99,6 +99,9 @@ $run{todo} = []; ["u", "umedia", 1, "<upload media>", "Media where rebuilt DKMS packages will be uploaded", sub { my ($tmp, $media) = @_; $tmp->[0]{umedia} = $media; 1 }, "Uploading rebuilt DKMS packages to the given media"], + ["v", "kversion", 1, "<kernel version>", + "kernel for which DKMS packages should be rebuilt", + sub { my ($tmp, $kversion) = @_; $tmp->[0]{kversion} = $kversion; 1 }, "Rebuilding only for given kernel version"], ["p", "package", 1, "<package>", "DKMS package which should be rebuilt", sub { my ($tmp, $package) = @_; $tmp->[0]{package} = $package; 1 }, "Rebuilding only given DKMS packages"], 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/([^/ ]+),; |