aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-09-04 08:37:49 +0000
committerOlivier Blin <oblin@mandriva.com>2007-09-04 08:37:49 +0000
commitfdf627e0a2a4f67c4fcb075790bcf9652070407b (patch)
tree43c53acfc3ecc8ecfcd76dee831da31390ebc382
parentff07cf61c70154aff6bbcd0cecae2079600eeed9 (diff)
downloadrpm-setup-fdf627e0a2a4f67c4fcb075790bcf9652070407b.tar
rpm-setup-fdf627e0a2a4f67c4fcb075790bcf9652070407b.tar.gz
rpm-setup-fdf627e0a2a4f67c4fcb075790bcf9652070407b.tar.bz2
rpm-setup-fdf627e0a2a4f67c4fcb075790bcf9652070407b.tar.xz
rpm-setup-fdf627e0a2a4f67c4fcb075790bcf9652070407b.zip
find kmod() provides in dkms.conf files (default on PACKAGE_NAME if no BUILT_MODULE_NAME is specified)
-rwxr-xr-xkmod.prov10
1 files changed, 10 insertions, 0 deletions
diff --git a/kmod.prov b/kmod.prov
index f378ec3..2ea435b 100755
--- a/kmod.prov
+++ b/kmod.prov
@@ -11,3 +11,13 @@ if (/^srcversion:/) {
undef $name, $ver;
}
'
+dkmslist=$(echo "$provideslist" | egrep '/usr/src/[^/]*/dkms.conf$')
+echo $dkmslist | while read d; do
+ BUILT=`sed -rne 's/^BUILT_MODULE_NAME\[[0-9]+\]="?([^"]+)"?$/kmod(\1)/;T;p' $d`
+ if [ -n "$BUILT" ]; then
+ echo "$BUILT"
+ else
+ # default on PACKAGE_NAME if no BUILT_MODULE_NAME is specified
+ sed -rne 's/^PACKAGE_NAME="?([^"]+)"?$/kmod(\1)/;T;p' $d
+ fi
+done