aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Iurt
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-04-02 19:04:28 +0000
committerOlivier Blin <oblin@mandriva.com>2008-04-02 19:04:28 +0000
commitd2c250d65422521a49192102566ecc42da3066dd (patch)
tree2f600f7cfc4bd32401884b9256bce6ae863bae60 /lib/Iurt
parentd3efecf7587b35096d10b56c764bee2ae4ec46c5 (diff)
downloadiurt-d2c250d65422521a49192102566ecc42da3066dd.tar
iurt-d2c250d65422521a49192102566ecc42da3066dd.tar.gz
iurt-d2c250d65422521a49192102566ecc42da3066dd.tar.bz2
iurt-d2c250d65422521a49192102566ecc42da3066dd.tar.xz
iurt-d2c250d65422521a49192102566ecc42da3066dd.zip
use better regexp and rpm output format
Diffstat (limited to 'lib/Iurt')
-rw-r--r--lib/Iurt/DKMS.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Iurt/DKMS.pm b/lib/Iurt/DKMS.pm
index 8c35174..dd5a017 100644
--- a/lib/Iurt/DKMS.pm
+++ b/lib/Iurt/DKMS.pm
@@ -91,14 +91,14 @@ sub search_dkms {
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 $files = $hdr->queryformat('[%{FILENAMES}\n]');
if ($version =~ /(.*)source-(.*)/ || $version =~ /(.*)devel-(.*)/) {
my $source = "$1$2";
- my ($sourcedir) = $files =~ m, /usr/src/([^/ ]+),;
+ my ($sourcedir) = $files =~ m,^/usr/src/([^/ ]+)$,m;
plog('NOTIFY', "kernel source $version ($source sourcedir $sourcedir)");
$kernel_source{$source} = [ $version, $sourcedir ];
} else {
- my ($modulesdir) = $files =~ m, /lib/modules/([^/ ]+),;
+ my ($modulesdir) = $files =~ m,^/lib/modules/([^/ ]+)$,m;
if ($modulesdir) {
plog('NOTIFY', "kernel $version (modules dir $modulesdir)");
push @kernel, [ $version, $modulesdir ];