From 4964451a321cfd6a05ea32af1317345c53b3ecb7 Mon Sep 17 00:00:00 2001 From: Frans Pop Date: Thu, 23 Apr 2009 01:09:25 +0200 Subject: 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. Signed-off-by: Frans Pop Acked-by: maximilian attems Cc: Andres Salomon Signed-off-by: Sam Ravnborg --- scripts/package/builddeb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts/package/builddeb') diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 4876ff3154a1..5eecbbe58114 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -1,6 +1,6 @@ #!/bin/sh # -# builddeb 1.2 +# builddeb 1.3 # Copyright 2003 Wichert Akkerman # # 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 EOF -- cgit v1.2.3-59-g8ed1b