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

Bug#523735: /etc/kernel/postinst.d/initramfs-tools: please consider supporting the experimental kernel-package out of the box



On Fri, Jul 03 2009, Matthijs Kooijman wrote:
>>         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?

        That is correct.

> 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

        Or if STEM is set. postinst scripts run by kernel-package image
 packages have for a long time exported STEM=linux in the environment.

>  b) KERNEL_PACKAGE_VERSION is not set and there is only a single
>     argument is passed (e.g., for official kernels).

        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.

> 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?

        I hope so. In any case, kernel-package is getting behind this
 proposal. 

        manoj
-- 
All constants are variables.
Manoj Srivastava <srivasta@debian.org> <http://www.debian.org/~srivasta/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C



Reply to: