Hi, Here's the next batch of patches to the dist-kernel framework. This includes:
1. Introducing a new dist-kernel-utils.eclass that can be used by packages that need some logic related to dist-kernel but do not want to fight the phase functions exported by the current eclasses. 2. Adding a new dist-kernel_reinstall_initramfs function that triggers initramfs rebuild and installkernel for the currently installed dist-kernel (if any). The primary use case is ensuring that the necessary kernel modules are included in the initramfs for the newly built kernel. This relies on the dist-kernel flag introduced by the previous patchset, that triggers module rebuilds on kernel upgrade. Technically, the process is: 1. New kernel is installed, with 'broken' initramfs. 2. Modules are rebuilt, via slot operator rebuilds. 3. When important modules are rebuilt, initramfs is updated via their postinst. This was requested for sys-fs/zfs-kmod, and the patch for it is included in the thread. However, I do not use ZFS, so I'd appreciate if someone who does did a real-system testing. Michał Górny (3): dist-kernel-utils.eclass: Introduce eclass for helper functions dist-kernel-utils.eclass: Add a function to rebuild initramfs sys-fs/zfs-kmod: Rebuild initramfs after installing eclass/dist-kernel-utils.eclass | 132 ++++++++++++++++++ eclass/kernel-build.eclass | 4 +- eclass/kernel-install.eclass | 80 ++--------- sys-fs/zfs-kmod/zfs-kmod-0.8.6.ebuild | 6 +- sys-fs/zfs-kmod/zfs-kmod-2.0.1.ebuild | 6 +- sys-fs/zfs-kmod/zfs-kmod-9999.ebuild | 6 +- .../gentoo-kernel-bin-5.10.3-r1.ebuild | 2 +- .../gentoo-kernel-bin-5.10.3.ebuild | 2 +- .../gentoo-kernel-bin-5.10.4-r1.ebuild | 2 +- .../gentoo-kernel-bin-5.10.4.ebuild | 2 +- .../gentoo-kernel-bin-5.10.5-r1.ebuild | 2 +- .../gentoo-kernel-bin-5.10.5.ebuild | 2 +- .../gentoo-kernel-bin-5.10.6.ebuild | 2 +- .../gentoo-kernel-bin-5.4.80-r2.ebuild | 2 +- .../gentoo-kernel-bin-5.4.83-r1.ebuild | 2 +- .../gentoo-kernel-bin-5.4.83.ebuild | 2 +- .../gentoo-kernel-bin-5.4.85-r1.ebuild | 2 +- .../gentoo-kernel-bin-5.4.85.ebuild | 2 +- .../gentoo-kernel-bin-5.4.86-r1.ebuild | 2 +- .../gentoo-kernel-bin-5.4.86.ebuild | 2 +- .../gentoo-kernel-bin-5.4.87-r1.ebuild | 2 +- .../gentoo-kernel-bin-5.4.87.ebuild | 2 +- .../gentoo-kernel-bin-5.4.88.ebuild | 2 +- 23 files changed, 174 insertions(+), 94 deletions(-) create mode 100644 eclass/dist-kernel-utils.eclass -- 2.30.0