From patchwork Fri Aug 20 01:20:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Watson X-Patchwork-Id: 62245 X-Patchwork-Delegate: leann.ogasawara@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 48D1AB70DC for ; Fri, 20 Aug 2010 11:20:28 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1OmGHI-00076X-D2; Fri, 20 Aug 2010 02:20:16 +0100 Received: from smarthost02.mail.zen.net.uk ([212.23.3.141]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1OmGHG-00075o-Fu for kernel-team@lists.ubuntu.com; Fri, 20 Aug 2010 02:20:14 +0100 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost02.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1OmGHE-0001oR-QU for kernel-team@lists.ubuntu.com; Fri, 20 Aug 2010 01:20:14 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) for kernel-team@lists.ubuntu.com id 1OmGH7-0003HE-00; Fri, 20 Aug 2010 02:20:05 +0100 Date: Fri, 20 Aug 2010 02:20:04 +0100 From: Colin Watson To: kernel-team@lists.ubuntu.com Subject: [PATCH] UBUNTU: Pass DEB_MAINT_PARAMS to hook scripts Message-ID: <20100820012004.GN21862@riva.ucam.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost02-IP: [82.69.40.219] X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com 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 Acked-by: Tim Gardner --- 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);