History

kbuild, deb-pkg: pass Debian maintainer script parameters to packaging hook scripts

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.

Frans Pop committed 17 years ago

Commit 49644511 parent a89b4331 file · +4 −1Browse files

Unified · Split

scripts/package/builddeb+4−1
@@ -1,6 +1,6 @@
11 #!/bin/sh
22 #
3−# builddeb 1.2
3+# builddeb 1.3
44 # Copyright 2003 Wichert Akkerman <wichert@wiggy.net>
55 #
66 # 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 · 68 unmodified lines
7575
7676 set -e
7777
78+# Pass maintainer script parameters to hook scripts
79+export DEB_MAINT_PARAMS="\$@"
80+
7881 test -d /etc/kernel/$script.d && run-parts --arg="$version" /etc/kernel/$script.d
7982 exit 0
8083 EOF