aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-01-07 15:28:28 +0000
committerOlivier Blin <oblin@mandriva.com>2008-01-07 15:28:28 +0000
commit4209a52a69ea87794c293011ce964e3c8c1dd3ec (patch)
tree4e113e746e613ac899e88b838db2fff8de62fb60
parentc514d5382b0ff30beebdc422fcb37c27e2daf729 (diff)
downloadiurt-4209a52a69ea87794c293011ce964e3c8c1dd3ec.tar
iurt-4209a52a69ea87794c293011ce964e3c8c1dd3ec.tar.gz
iurt-4209a52a69ea87794c293011ce964e3c8c1dd3ec.tar.bz2
iurt-4209a52a69ea87794c293011ce964e3c8c1dd3ec.tar.xz
iurt-4209a52a69ea87794c293011ce964e3c8c1dd3ec.zip
add --dkms -p option to iurt to allow rebuilding specific packages only
-rwxr-xr-xiurt23
-rw-r--r--lib/Iurt/DKMS.pm4
2 files changed, 6 insertions, 1 deletions
diff --git a/iurt2 b/iurt2
index 3ea2af4..30de5a9 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"],
+ ["p", "package", 1, "<package>",
+ "DKMS package which should be rebuilt",
+ sub { my ($tmp, $package) = @_; $tmp->[0]{package} = $package; 1 }, "Rebuilding only given DKMS packages"],
], "[options]",
"Set the DKMS rebuild mode",
sub { my ($opt) = @_; $run{dkms} = $opt; 1 }, "Running a DKMS rebuild run" ],
diff --git a/lib/Iurt/DKMS.pm b/lib/Iurt/DKMS.pm
index 9ed4333..81a4619 100644
--- a/lib/Iurt/DKMS.pm
+++ b/lib/Iurt/DKMS.pm
@@ -70,9 +70,11 @@ sub search_dkms {
if ($rpm =~ /^dkms-(.*)-([^-]+-[^-]+)\.[^.]+\.rpm/) {
# we only check for kernel or modules in this media
$media_ok or next;
+ my ($name, $version) = ($1, $2);
+ my $package_ok = $run->{dkms}{package} ? $name =~ /$run->{dkms}{package}/ : 1;
+ $package_ok or next;
my $hdr = RPM4::Header->new("$path/$rpm");
my $files = $hdr->queryformat('[%{FILENAMES} ])');
- my ($name, $version) = ($1, $2);
my ($modulesourcedir) = $files =~ m, /usr/src/([^/ ]+),;
my $script = $hdr->queryformat('%{POSTIN})');
my ($realversion) = $script =~ / -v (\S+)/;