Skip to content

Commit

Permalink
kbuild, deb-pkg: pass Debian maintainer script parameters to packagin…
Browse files Browse the repository at this point in the history
…g 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 <elendil@planet.nl>
Acked-by: maximilian attems <max@stro.at>
Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
  • Loading branch information
Frans Pop authored and Sam Ravnborg committed Jun 9, 2009
1 parent a89b433 commit 4964451
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/package/builddeb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
#
# 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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4964451

Please sign in to comment.