There is a new pull request by ahesford against master on the void-packages repository https://github.com/ahesford/void-packages dkms https://github.com/void-linux/void-packages/pull/23392 dkms: run depmod if necessary in kernel post-install hook Normally, `dkms install` will run depmod with each installed module to update module dependency lists. When force-reinstalling kernel packages, `dkms install` will not run because modules are already marked installed, but the kernel package will overwrite `modules.dep` and `modules.dep.bin` with packaged versions that do not include any modules installed by dkms. The kernel post-install hook now tracks whether depmod should be run and will do so if necessary. To demonstrate the original problem: 1. Install `zfs` and enable the dracut zfs module with `add_dracutmodules+=" zfs "` in `dracut.conf` or a `.conf` file in `/etc/dracut.conf.d`. 2. Rerun `dracut`, e.g., with `xbps-reconfigure -f linuxX.Y` for an appropriate kernel package. 3. Confirm that `zfs.ko.gz` is in the newly generated initramfs. 4. Force-reinstall the kernel package: `xbps-install -f linuxX.Y`. 5. Confirm that `zfs.ko.gz` is *missing* from the newly generated initramfs. With the changes in the hook, the force-installation of `linuxX.Y should display `Generating kernel module dependency lists... done.` after "building" all DKMS modules (note: the modules were already built for the reinstalled kernel, so the `dkms build` run by the hook is basically a no-op). The resulting initramfs will contain `zfs.ko.gz` as expected. Also, I propagated some return codes from `dkms` through the hook, which I believe was the original intention. (Before the fix, `exit $?` after an `echo` would generally always exit 0 because `echo` is unlikely to fail.) A patch file from https://github.com/void-linux/void-packages/pull/23392.patch is attached