Hi Manoj, > The second argument, which is the location of the kernel image > (which need not be in /boot, you know) is used by the scripts shipped > with kernel-package to create features that would not be otherwise > possible -- unless we also remove from kernel-package the ability to > install the image in locations other than /boot. Ah, that makes sense. I guess that the official kernels don't need this parameter because they always install into /boot? > One solution is to have the user deploy scripts into /etc/kernel > that meets their needs, but this seems to be somewhat tedious for end > users. Yup, that's not really a long-term solution IMHO. > A solution might be to create packages that just contain > conffiles in /etc/kernel/, and who provide the virtual package > kpkg-image-conf, and have all kernel-package image packages Recommend > the virtual package. This way, the user will not be impacted by the > inability of the initramfs-tools package's conffile to cater to the > other flavours of kernel image packages. This sounds rather like a lot of infrastructure for something simple. Also, how would this work with official kernel images? Would this new configfile apply the same second-argument test to only work with kernel-package generated kernels? In that case, we will be stuck forever with two complementary scripts (that essentially do the same) using some ugly hack based om parameter counts to not conflict with each other. Also, in this situation it would be impossible to remove the hack from either script later on. It seems to make more sense to remove the hack from the initramfs-tools script eventually, when the "new" version of kernel-package has been around for a while. However, until then, we need some other way of making things work, that will transition smoothly into a initramfs-tools script that works for all kernels. 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). This will make initramfs-tools, kernel-package and official kernels play together for both new and old versions. The only gap here is kernel-package 12.001 until the current version, which won't work out of the box (but we won't be able to fix those anyway). This approach also allows the initramfs-tools to remove the above checks eventually, when older versions of kernel-package can be considered to be no longer in use. Also, letting kernel-package pass its version to scripts might have other uses as well. It will allow scripts to change their behaviour based on kernel-package version in an elegant way. Even if we were to add kpkg-image-conf like packages later on, these could use the version number as well (because just using Depends: to get the right version won't work, since we might install kernel images built with different versions of kernel-package). Would this work? Gr. Matthijs
Attachment:
signature.asc
Description: Digital signature