diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-01-07 15:28:28 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-01-07 15:28:28 +0000 |
commit | 4209a52a69ea87794c293011ce964e3c8c1dd3ec (patch) | |
tree | 4e113e746e613ac899e88b838db2fff8de62fb60 | |
parent | c514d5382b0ff30beebdc422fcb37c27e2daf729 (diff) | |
download | iurt-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-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"], + ["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+)/; |