aboutsummaryrefslogtreecommitdiffstats
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
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
-rwxr-xr-xiurt23
-rw-r--r--lib/Iurt/DKMS.pm4
2 files changed, 6 insertions, 1 deletions
diff --git a/iurt2 b/iurt2
index 870f28f..f7e58a4 100755
--- a/iurt2
+++ b/iurt2
@@ -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/([^/ ]+),;