aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-09-27 09:45:34 +0000
committerOlivier Blin <oblin@mandriva.com>2007-09-27 09:45:34 +0000
commitdc69d1c955d47105a2cf98268e3cc76f71bb5444 (patch)
treec66a44e8b37833357484cd2fac3974c422d31bcc
parentd34a14160d9d8bb6c8333413dd3c75a296a05ee6 (diff)
downloadrpm-setup-dc69d1c955d47105a2cf98268e3cc76f71bb5444.tar
rpm-setup-dc69d1c955d47105a2cf98268e3cc76f71bb5444.tar.gz
rpm-setup-dc69d1c955d47105a2cf98268e3cc76f71bb5444.tar.bz2
rpm-setup-dc69d1c955d47105a2cf98268e3cc76f71bb5444.tar.xz
rpm-setup-dc69d1c955d47105a2cf98268e3cc76f71bb5444.zip
fix match of modules with '-'
-rwxr-xr-xkmod.prov2
1 files changed, 1 insertions, 1 deletions
diff --git a/kmod.prov b/kmod.prov
index fd90d9a..41f57eb 100755
--- a/kmod.prov
+++ b/kmod.prov
@@ -4,7 +4,7 @@ provideslist=`sed "s/['\"]/\\\&/g"`
modulelist=$(echo "$provideslist" | egrep '^.*(/lib/modules/|/var/lib/dkms/).*\.ko(\.gz)?$')
echo $modulelist | xargs -r /sbin/modinfo | \
perl -lne '
-$name = $1 if m!^filename:.*\b([^/]+)\.k?o!;
+$name = $1 if m!^filename:\s*(?:.*/)?([^/]+)\.k?o!;
$ver = $1 if /^version:\s*[a-zA-Z]{0,6}\-?(\d+[\.\:\-\[\]]?\d*[\.\:\-\[\]]?\d*[\.\:\-\[\]]?\d*[\.\:\-\[\]]?\d*-?[a-zA-Z]{0,6}\d?).*/;
if (/^vermagic:/) {
print "kmod\($name\) = $ver" if $name && $ver;