[Pkg-dkms-commits] [SCM] Dynamic Kernel Module Support branch, master, updated. debian/2.1.1.1-2-5-g9ccbdc7
David Paleino
dapal at debian.org
Thu Feb 18 17:10:27 UTC 2010
The following commit has been merged in the master branch:
commit 2930aa988da8779fd63ebe3ee5b2bbd763a7288c
Author: Frédéric Brière <fbriere at fbriere.net>
Date: Wed Feb 17 16:14:09 2010 -0500
Insert the package version directly into postinst at creation time
dh_dkms already knows the package version, so it can insert it directly
into the package's postinst, instead of trying to figure it out during
the installation. This was already the case for prerm, but not for
postinst.
(Besides, the dpkg-query invocation did not account for '-' being
allowed in the upstream version.)
This also renames $DKMS_CVERSION to $DKMS_VERSION, in line with prerm.
diff --git a/debian/scripts/dh_dkms b/debian/scripts/dh_dkms
index 085b232..f2644ad 100755
--- a/debian/scripts/dh_dkms
+++ b/debian/scripts/dh_dkms
@@ -150,7 +150,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
autoscript($package, "prerm", "prerm-dkms",
"s/#MODULE_NAME#/$package_name/;s/#MODULE_VERSION#/$package_version/");
autoscript($package, "postinst", "postinst-dkms",
- "s/#MODULE_NAME#/$package_name/");
+ "s/#MODULE_NAME#/$package_name/;s/#MODULE_VERSION#/$package_version/");
doit("install", "-p", "-D", "-m644", "$name", "$tmp/usr/src/$package_name-$package_version/dkms.conf");
}
diff --git a/debian/scripts/postinst-dkms b/debian/scripts/postinst-dkms
index 706a9a6..0084a6e 100644
--- a/debian/scripts/postinst-dkms
+++ b/debian/scripts/postinst-dkms
@@ -3,7 +3,7 @@
DKMS_NAME=#MODULE_NAME#
DKMS_PACKAGE_NAME=$DKMS_NAME-dkms
-DKMS_CVERSION=$(dpkg-query -W -f='${Version}' $DKMS_PACKAGE_NAME | awk -F "-" '{print $1}' | cut -d\: -f2)
+DKMS_VERSION=#MODULE_VERSION#
postinst_found=0
@@ -11,7 +11,7 @@ case "$1" in
configure)
for DKMS_POSTINST in /usr/lib/dkms/common.postinst /usr/share/$DKMS_PACKAGE_NAME/postinst; do
if [ -f $DKMS_POSTINST ]; then
- $DKMS_POSTINST $DKMS_NAME $DKMS_CVERSION /usr/share/$DKMS_PACKAGE_NAME "" $2
+ $DKMS_POSTINST $DKMS_NAME $DKMS_VERSION /usr/share/$DKMS_PACKAGE_NAME "" $2
postinst_found=1
break
fi
--
Dynamic Kernel Module Support
More information about the Pkg-dkms-commits
mailing list