-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Package: dkms
Version: 2.1.1.2-3
Severity: normal
Tags: patch
dkms.conf allows to set a BUILD_EXCLUSIVE_KERNEL / BUILD_EXCLUSIVE_ARCH
parameter to specify a regular expression which defines the subset of
kernels / architectures which DKMS is allowed to build the module for. If
the kernel being built for does not match against this regular
expressions, the dkms build will error out with exit code 9.
The attached patch changes dkms_common.postinst to handle this dkms build
error gracefully by skipping build for the non matching kernels.
Jan-Marek
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkw3mNkACgkQj6MK58wZA3cPNQCcD30J9n8ghtyM6XgQ/3piuYzk
bOAAniWWGJ0t5KMZyhKl+onWCa152/3W
=2BFa
-----END PGP SIGNATURE-----
--- dkms_common.postinst 2010-01-26 00:56:54.000000000 +0100
+++ /usr/lib/dkms/common.postinst 2010-07-09 23:45:10.000000000 +0200
@@ -231,8 +231,22 @@
fi
if [ -e /lib/modules/$KERNEL/build/include ]; then
echo "Building initial module for $KERNEL"
+ set +e
dkms build -m $NAME -v $VERSION -k $KERNEL $ARCH > /dev/null
- echo "Done."
+ case $? in
+ 9)
+ set -e
+ echo "Skipped."
+ continue
+ ;;
+ 0)
+ set -e
+ echo "Done."
+ ;;
+ *)
+ exit $?
+ ;;
+ esac
dkms_status=`dkms status -m $NAME -v $VERSION -k $KERNEL $ARCH`
else
echo "Module build for the currently running kernel was skipped since the"