diff options
author | Frans Pop <elendil@planet.nl> | 2009-04-22 19:09:25 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2009-06-09 16:37:36 -0400 |
commit | 4964451a321cfd6a05ea32af1317345c53b3ecb7 (patch) | |
tree | 246fdb5effc8ec5136b54bc0f4e0ae78f1826e68 /scripts/package | |
parent | a89b433bddea41a743d7937c87be5290ef4f1057 (diff) |
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 <elendil@planet.nl>
Acked-by: maximilian attems <max@stro.at>
Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/package')
-rw-r--r-- | scripts/package/builddeb | 5 |
1 files changed, 4 insertions, 1 deletions
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 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | 2 | # |
3 | # builddeb 1.2 | 3 | # builddeb 1.3 |
4 | # Copyright 2003 Wichert Akkerman <wichert@wiggy.net> | 4 | # Copyright 2003 Wichert Akkerman <wichert@wiggy.net> |
5 | # | 5 | # |
6 | # Simple script to generate a deb package for a Linux kernel. All the | 6 | # 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 | |||
75 | 75 | ||
76 | set -e | 76 | set -e |
77 | 77 | ||
78 | # Pass maintainer script parameters to hook scripts | ||
79 | export DEB_MAINT_PARAMS="\$@" | ||
80 | |||
78 | test -d /etc/kernel/$script.d && run-parts --arg="$version" /etc/kernel/$script.d | 81 | test -d /etc/kernel/$script.d && run-parts --arg="$version" /etc/kernel/$script.d |
79 | exit 0 | 82 | exit 0 |
80 | EOF | 83 | EOF |