From patchwork Wed Apr 22 23:09:25 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frans Pop X-Patchwork-Id: 19445 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3MN8b5i031480 for ; Wed, 22 Apr 2009 23:09:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751832AbZDVXJ3 (ORCPT ); Wed, 22 Apr 2009 19:09:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751732AbZDVXJ3 (ORCPT ); Wed, 22 Apr 2009 19:09:29 -0400 Received: from cpsmtpm-eml101.kpnxchange.com ([195.121.3.5]:63781 "EHLO CPSMTPM-EML101.kpnxchange.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751832AbZDVXJ2 (ORCPT ); Wed, 22 Apr 2009 19:09:28 -0400 Received: from aragorn.fjphome.nl ([84.85.147.182]) by CPSMTPM-EML101.kpnxchange.com with Microsoft SMTPSVC(7.0.6001.18000); Thu, 23 Apr 2009 01:09:26 +0200 From: Frans Pop To: linux-kbuild@vger.kernel.org Subject: [PATCH 4/14] deb-pkg: pass Debian maintainer script parameters to packaging hook scripts Date: Thu, 23 Apr 2009 01:09:25 +0200 User-Agent: KMail/1.9.9 Cc: Sam Ravnborg , maximilian attems , Andres Salomon References: <200904230034.59627.elendil@planet.nl> In-Reply-To: <200904230034.59627.elendil@planet.nl> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200904230109.26615.elendil@planet.nl> X-OriginalArrivalTime: 22 Apr 2009 23:09:26.0971 (UTC) FILETIME=[6217C0B0:01C9C39F] Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org 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 Cc: maximilian attems Cc: Andres Salomon --- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 4876ff3..5eecbbe 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 @@ -75,6 +75,9 @@ for script in postinst postrm preinst prerm ; do set -e +# Pass maintainer script parameters to hook scripts +export DEB_MAINT_PARAMS="\$@" + test -d /etc/kernel/$script.d && run-parts --arg="$version" /etc/kernel/$script.d exit 0 EOF