From patchwork Wed May 30 12:23:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 161957 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 A85ACB7032 for ; Wed, 30 May 2012 22:23:14 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SZhvc-00014t-6h; Wed, 30 May 2012 12:23:04 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SZhva-00014f-EF for kernel-team@lists.ubuntu.com; Wed, 30 May 2012 12:23:02 +0000 Received: from 79-78-211-255.dynamic.dsl.as9105.com ([79.78.211.255] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SZhva-0006A5-4z; Wed, 30 May 2012 12:23:02 +0000 From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1] UBUNTU: [Config] linux-image-extras needs full postinst Date: Wed, 30 May 2012 13:23:00 +0100 Message-Id: <1338380580-24178-2-git-send-email-apw@canonical.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1338380580-24178-1-git-send-email-apw@canonical.com> References: <1338380580-24178-1-git-send-email-apw@canonical.com> Cc: Andy Whitcroft X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com Currently after installing the linux-image-extras package we attempt to rebuild the module lists (via depmod) which succeeds, and then rebuild the initramfs which does not. We call update-initramfs but this does not works from a kernel postinst, we end up indicating that we would like to trigger a delayed initramfs build but do not actually then go on to trigger it (which is positive as it would likely build the wrong initramfs anyhow). When we install the extras package we may well need to perform whatever processing we perform when the original kernel is installed. Use the same post installation/post remove hooks. Signed-off-by: Andy Whitcroft --- debian/control-scripts/postinst.extra | 8 -------- debian/control-scripts/postrm.extra | 8 -------- debian/rules.d/2-binary-arch.mk | 5 +++-- 3 files changed, 3 insertions(+), 18 deletions(-) delete mode 100644 debian/control-scripts/postinst.extra delete mode 100644 debian/control-scripts/postrm.extra diff --git a/debian/control-scripts/postinst.extra b/debian/control-scripts/postinst.extra deleted file mode 100644 index a370b4c..0000000 --- a/debian/control-scripts/postinst.extra +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -case "$1" in - configure) - depmod -a -F /boot/System.map-@@KVER@@ @@KVER@@ - update-initramfs -u -k @@KVER@@ - ;; -esac diff --git a/debian/control-scripts/postrm.extra b/debian/control-scripts/postrm.extra deleted file mode 100644 index 0adcc62..0000000 --- a/debian/control-scripts/postrm.extra +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -case "$1" in - remove|purge) - depmod -a -F /boot/System.map-@@KVER@@ @@KVER@@ - update-initramfs -u -k @@KVER@@ - ;; -esac diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index ad8c812..a2555ee 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -127,8 +127,9 @@ endif if [ -f $(DEBIAN)/control.d/$(target_flavour).inclusion-list ] ; then \ install -d $(pkgdir_ex)/DEBIAN; \ for script in postinst postrm ; do \ - sed -e 's/@@KVER@@/$(release)-$(abinum)-$(target_flavour)/g' \ - debian/control-scripts/$$script.extra > $(pkgdir_ex)/DEBIAN/$$script; \ + sed -e 's/=V/$(abi_release)-$*/g' -e 's/=K/$(install_file)/g' \ + -e 's/=L/$(loader)/g' -e 's@=B@$(build_arch)@g' \ + debian/control-scripts/$$script > $(pkgdir_ex)/DEBIAN/$$script; \ chmod 755 $(pkgdir_ex)/DEBIAN/$$script; \ done; \ fi