Hi maks, > > > Done in my local git repo. The next upload of kernel-package, > > > 12.018, will export KERNEL_PACKAGE_VERSION (and also STEM, usually > > > linux) into the environment. > > Nice. > > support added, please verify in latest initramfs git, see > http://git.debian.org/?p=kernel/initramfs-tools.git
I'm not completely sure how the patch works. From how I read it, there are three changes: 1) When ran by kernel-package, and a second argument is passed, use that as the boot dir passed with -b to update-initramfs. This seems like a good idea, but seems unrelated to the main change. 2) When $DEB_MAINT_PARAMS is set, only run if it starts with "configure". I'm completely unaware of where this variable comes from and who sets it, but this also seems unrelated (unless the official kernel images and newer kernel-package versions set this, while older versions do not?). 3) The "If I'm called by kernel-package, don't run" check has been completely removed. This is the main change in the commit, but I think it is a bit stronger than we had discussed (See below). As for the third point, my original proposal was as follows: > I propose the following: Let kernel-package expose a KERNEL_PACKAGE_VERSION > variable to /etc/kernel/postinst.d scripts. This allows the initramfs-tools > script to generate an initrd if > a) KERNEL_PACKAGE_VERSION >= 12.001 > b) KERNEL_PACKAGE_VERSION is not set and there is only a single argument is > passed (e.g., for official kernels). The first part (expose KERNEL_PACKAGE_VERSION) was implemented in kernel-package 12.018, but it seems the checks proposed have been removed alltogether. This might be intentional (which means dropping support for kernels generated with kernel-package < 12.001)? Actually, we're not even dropping support alltogether, since the only effect would be that update-initramfs is called twice for kernels generated with < 12.001. It might even be a good idea, since the alternative (as proposed by me above) would mean still supporting kernel-package < 12.001, but breaking kernel-package >= 12.001 < 12.018. On a second reading of the diff, it seems by point 3) above is invalid. The first if clause also contains an exit 0, which causes the update-initramfs to be not run if a second argument is passed but KERNEL_PACKAGE_VERSION is not set (e.g., for kernel-package < 12.018). This is pretty much my proposal (just without the >= 12.001 version check, but since KERNEL_PACKAGE_VERSION will never be below 12.018, this is the same). However, I've nearly convinced myself that removing the check and always running update-initramfs-tools might be the better approach, since it makes all kernels work out of the box (generating the initramfs twice for < 12.001, but that's more acceptable than not generating any for >= 12.001 < 12.018 I think?). So, perhaps we should remove one more check? Manoj? Gr. Matthijs
signature.asc
Description: Digital signature