Package: plymouth Version: 0.7.2-1 Severity: minor Tags: patch The triggers do all the hard work so there's no need to do this in the postinst and regenerate all initramfs images all the time (which takes quiet some time and might break old initramfs images). Patch attached. Cheers,, -- Guido
-- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.33 (SMP w/2 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
>From cf7bbab448309082d53b31472272ac8b74cabbfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= <a...@sigxcpu.org> Date: Sat, 13 Mar 2010 13:43:20 +0100 Subject: [PATCH 2/2] Simplify initramfs logic the triggers do all the hard work. --- debian/plymouth.postinst | 31 ++++++------------------------- debian/plymouth.postrm | 32 -------------------------------- 2 files changed, 6 insertions(+), 57 deletions(-) delete mode 100644 debian/plymouth.postrm diff --git a/debian/plymouth.postinst b/debian/plymouth.postinst index db48fb4..2c082e5 100644 --- a/debian/plymouth.postinst +++ b/debian/plymouth.postinst @@ -2,31 +2,12 @@ set -e -if ! ls /boot/vmlinu* > /dev/null 2>&1 -then - exit 0 -fi - -case "$(ls -l /boot/vmlinu* | wc -l)" in - 1) - # We only have one kernel installed, so we can use "-u" - # which will use dpkg-trigger inside update-initramfs - INITRAMFS_ARGS="-u" - ;; - - *) - INITRAMFS_ARGS="-u -k all" - ;; +case "$1" in + configure) + if [ -x /usr/sbin/update-initramfs ]; then + update-initramfs -u + fi + ;; esac -if [ -x /usr/sbin/update-initramfs ] && [ "${1}" != "triggered" ] && \ - dpkg --compare-versions "${DPKG_RUNNING_VERSION}" ge "1.14.18" -then - # this activates the trigger, if triggers are working - update-initramfs ${INITRAMFS_ARGS} -else - # force it to actually happen - DPKG_MAINTSCRIPT_PACKAGE="" /usr/sbin/update-initramfs ${INITRAMFS_ARGS} -fi - #DEBHELPER# diff --git a/debian/plymouth.postrm b/debian/plymouth.postrm deleted file mode 100644 index db48fb4..0000000 --- a/debian/plymouth.postrm +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -set -e - -if ! ls /boot/vmlinu* > /dev/null 2>&1 -then - exit 0 -fi - -case "$(ls -l /boot/vmlinu* | wc -l)" in - 1) - # We only have one kernel installed, so we can use "-u" - # which will use dpkg-trigger inside update-initramfs - INITRAMFS_ARGS="-u" - ;; - - *) - INITRAMFS_ARGS="-u -k all" - ;; -esac - -if [ -x /usr/sbin/update-initramfs ] && [ "${1}" != "triggered" ] && \ - dpkg --compare-versions "${DPKG_RUNNING_VERSION}" ge "1.14.18" -then - # this activates the trigger, if triggers are working - update-initramfs ${INITRAMFS_ARGS} -else - # force it to actually happen - DPKG_MAINTSCRIPT_PACKAGE="" /usr/sbin/update-initramfs ${INITRAMFS_ARGS} -fi - -#DEBHELPER# -- 1.7.0