[PATCH] UBUNTU: Pass DEB_MAINT_PARAMS to hook scripts
Tim Gardner
tim.gardner at canonical.com
Fri Aug 20 13:44:22 UTC 2010
On 08/19/2010 07:20 PM, Colin Watson wrote:
> This matches
> http://svn.debian.org/viewsvn/kernel/dists/trunk/linux-2.6?view=rev&revision=15014
> (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=563161), and is
> necessary in order to implement current boot loader packaging policies
> (http://lists.debian.org/debian-kernel/2010/07/msg00078.html) in grub2.
>
> Signed-off-by: Colin Watson<cjwatson at canonical.com>
> ---
> debian/control-scripts/postinst | 7 +++++++
> debian/control-scripts/postrm | 7 +++++++
> debian/control-scripts/preinst | 7 +++++++
> debian/control-scripts/prerm | 7 +++++++
> 4 files changed, 28 insertions(+), 0 deletions(-)
>
> diff --git a/debian/control-scripts/postinst b/debian/control-scripts/postinst
> index b1baa71..ce5ae56 100644
> --- a/debian/control-scripts/postinst
> +++ b/debian/control-scripts/postinst
> @@ -993,6 +993,13 @@ sub run_hook {
> }
> }
>
> +my $options;
> +for (@ARGV) {
> + s,','\\'',g;
> + $options .= " '$_'";
> +}
> +$ENV{'DEB_MAINT_PARAMS'}="$options";
> +
> ## Run user hook script here, if any
> if ($postinst_hook) {
> &run_hook("postinst", $postinst_hook);
> diff --git a/debian/control-scripts/postrm b/debian/control-scripts/postrm
> index b81d7aa..227e351 100644
> --- a/debian/control-scripts/postrm
> +++ b/debian/control-scripts/postrm
> @@ -312,6 +312,13 @@ sub run_hook {
> }
> }
>
> +my $options;
> +for (@ARGV) {
> + s,','\\'',g;
> + $options .= " '$_'";
> +}
> +$ENV{'DEB_MAINT_PARAMS'}="$options";
> +
> ## Run user hook script here, if any
> if ($postrm_hook) {
> &run_hook("postrm", $postrm_hook);
> diff --git a/debian/control-scripts/preinst b/debian/control-scripts/preinst
> index 11c335a..6824225 100644
> --- a/debian/control-scripts/preinst
> +++ b/debian/control-scripts/preinst
> @@ -272,6 +272,13 @@ sub run_hook {
> }
>
>
> +my $options;
> +for (@ARGV) {
> + s,','\\'',g;
> + $options .= " '$_'";
> +}
> +$ENV{'DEB_MAINT_PARAMS'}="$options";
> +
> ## Run user hook script here, if any
> if (-x "$preinst_hook") {
> &run_hook("preinst", $preinst_hook);
> diff --git a/debian/control-scripts/prerm b/debian/control-scripts/prerm
> index c214842..07e4146 100644
> --- a/debian/control-scripts/prerm
> +++ b/debian/control-scripts/prerm
> @@ -259,6 +259,13 @@ sub run_hook {
> }
>
>
> +my $options;
> +for (@ARGV) {
> + s,','\\'',g;
> + $options .= " '$_'";
> +}
> +$ENV{'DEB_MAINT_PARAMS'}="$options";
> +
> ## Run user hook script here, if any
> if (-x "$prerm_hook") {
> &run_hook("prerm", $prerm_hook);
Thanks Colin. I've gotten subscribed to debian-kernel at lists.debian.org
so perhaps I can stay abreast of some of these changes.
Acked-by: Tim Gardner <tim.gardner at canonical.com>
--
Tim Gardner tim.gardner at canonical.com
More information about the kernel-team
mailing list