Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934116AbZDATns (ORCPT ); Wed, 1 Apr 2009 15:43:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934001AbZDATnW (ORCPT ); Wed, 1 Apr 2009 15:43:22 -0400 Received: from Cpsmtpm-eml110.kpnxchange.com ([195.121.3.14]:54949 "EHLO CPSMTPM-EML110.kpnxchange.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934041AbZDATnV (ORCPT ); Wed, 1 Apr 2009 15:43:21 -0400 From: Frans Pop To: linux-kbuild@vger.kernel.org Subject: [PATCH 3/5] deb-pkg: pass Debian maintainer script parameters to packaging hook scripts Date: Wed, 1 Apr 2009 21:43:17 +0200 User-Agent: KMail/1.9.9 Cc: linux-kernel@vger.kernel.org, Sam Ravnborg References: <200904012133.37387.elendil@planet.nl> In-Reply-To: <200904012133.37387.elendil@planet.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904012143.18562.elendil@planet.nl> X-OriginalArrivalTime: 01 Apr 2009 19:43:18.0814 (UTC) FILETIME=[1B6C03E0:01C9B302] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1538 Lines: 43 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 diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 5b1517d..c9a4dcd 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -1,6 +1,6 @@ #!/bin/sh # -# builddeb 1.2 +# builddeb 1.3 # Copyright 2003 Wichert Akkerman # # Simple script to generate a deb package for a Linux kernel. All the @@ -63,7 +63,11 @@ for script in postinst postrm preinst prerm ; do set -e -test -d /etc/kernel/$script.d && run-parts --arg="$version" /etc/kernel/$script.d +# Pass maintainer script parameters to hook scripts +export DEB_MAINT_PARAMS="\$@" + +test -d $debhookdir/$script.d && \\ + run-parts --arg="$version" /etc/kernel/$script.d exit 0 EOF chmod 755 "$tmpdir/DEBIAN/$script" -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/