[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#664171: initramfs-tools: initrd cannot be easily disabled when not using kernel-package



Package: initramfs-tools
Version: 0.100
Severity: normal
Tags: patch

Dear Maintainer,

when creating kernel package by other means than make-kpkg
(e.g. using the kernel's make deb-pkg target), initrd creation
cannot be disabled easily, since the appropriate script checks
whether $KERNEL_PACKAGE_VERSION is set, for a reason that seems
entirely unclear to me. The patch below removes the superfluous
check:


diff --git a/kernel/postinst.d/initramfs-tools b/kernel/postinst.d/initramfs-tools
index 76bb7ee..42474c7 100755
--- a/kernel/postinst.d/initramfs-tools
+++ b/kernel/postinst.d/initramfs-tools
@@ -9,8 +9,8 @@ if [ -z "${version}" ]; then
 	exit 2
 fi
 
-# exit if custom kernel does not need an initramfs
-if [ -n "${KERNEL_PACKAGE_VERSION}" ] && [ "$INITRD" = 'No' ]; then
+# exit if kernel does not need an initramfs
+if [ "$INITRD" = 'No' ]; then
 	exit 0
 fi
 


(As a followup, I have a straightforward patch for the kernel ready
that allows easily disabling initrd when invoking make deb-kpkg;
but the patch cannot work as-is before this change without also
setting fake KERNEL_PACKAGE_VERSION, which might confuse some other
script.)


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=cs_CZ.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages initramfs-tools depends on:
ii  cpio               2.11-7
ii  findutils          4.4.2-4
ii  klibc-utils        2.0~rc3-1
ii  module-init-tools  3.16-1
ii  udev               175-3.1

Versions of packages initramfs-tools recommends:
ii  busybox  1:1.19.3-5

Versions of packages initramfs-tools suggests:
ii  bash-completion  1:1.99-3

-- no debconf information



Reply to: