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 @@
1#!/bin/sh1#!/bin/sh
2#2#
3# builddeb 1.23# 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 the6# 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
75 75
76set -e76set -e
77 77
78# Pass maintainer script parameters to hook scripts
79export DEB_MAINT_PARAMS="\$@"
80
78test -d /etc/kernel/$script.d && run-parts --arg="$version" /etc/kernel/$script.d81test -d /etc/kernel/$script.d && run-parts --arg="$version" /etc/kernel/$script.d
79exit 082exit 0
80EOF83EOF