diff mbox

[4/14] deb-pkg: pass Debian maintainer script parameters to packaging hook scripts

Message ID 200904230109.26615.elendil@planet.nl (mailing list archive)
State New, archived
Headers show

Commit Message

Frans Pop April 22, 2009, 11:09 p.m. UTC
The Debian packaging scripts created by the deb-pkg target do not pass
on the standard Debian maintainer script parameters to hook scripts,
which means that those scripts cannot tell whether they are being called
during e.g. install vs. upgrade, or removal vs. purge of the package.

As there are several variantions in how hook scripts are called from
kernel packages, we pass the parameters in the environment variable
DEB_MAINT_PARAMS rather than as extra arguments.

Bump version of builddep script to 1.3.

Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: maximilian attems <max@stro.at>
Cc: Andres Salomon <dilinger@debian.org>

To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox


diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 4876ff3..5eecbbe 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -1,6 +1,6 @@ 
-# builddeb 1.2
+# builddeb 1.3
 # Copyright 2003 Wichert Akkerman <wichert@wiggy.net>
 # Simple script to generate a deb package for a Linux kernel. All the
@@ -75,6 +75,9 @@  for script in postinst postrm preinst prerm ; do
 set -e
+# Pass maintainer script parameters to hook scripts
+export DEB_MAINT_PARAMS="\$@"
 test -d /etc/kernel/$script.d && run-parts --arg="$version" /etc/kernel/$script.d
 exit 0