New issue by Ypnose on void-packages repository https://github.com/void-linux/void-packages/issues/30401 Description: ### System * xuname: `Void 5.10.31_1 x86_64 GenuineIntel uptodate rF` ### Expected behavior I stick with LTS kernels because it fits my needs. Installing `zfs` will automatically pull `dkms` dependency and therefore `linux-headers` meta-package (`linux-headers-5.11_1` → `linux5.11-headers-5.11.15_1` as of today). Linux `5.11` is not installed on my system. Even if `linux5.10-headers` is installed, it will not be "detected" as the required dependendy here (instead of `linux5.11-headers`). It would be good to not install latest `linux5.xx-headers` on a system with LTS only. ### Actual behavior `linux-headers-5.11_1` meta-package is pulled by `xbps` as a `dkms` dependency. Then, DKMS builds for `5.11.x` will be attempted on my system, even if no `5.11` kernel is installed : ``` $ xbps-query -l | grep linux ii linux-headers-5.11_1 Linux kernel headers meta package ii linux5.10-5.10.31_1 Linux kernel and modules (5.10 series) ii linux5.10-headers-5.10.31_1 Linux kernel and modules (5.10 series) - source headers for 3rd party modules ii linux5.11-headers-5.11.15_1 Linux kernel and modules (5.11 series) - source headers for 3rd party modules ``` Here's the `xbps` output : ```Building DKMS module 'zfs-2.0.4' for kernel-5.10.31_1... done. Installing DKMS module 'zfs-2.0.4' for kernel-5.10.31_1... done. Building DKMS module 'zfs-2.0.4' for kernel-5.11.11_1... done. Installing DKMS module 'zfs-2.0.4' for kernel-5.11.11_1... done. Building DKMS module 'zfs-2.0.4' for kernel-5.11.15_1... done. Installing DKMS module 'zfs-2.0.4' for kernel-5.11.15_1... done. Skipping kernel-5.4.78_1. kernel-headers package not installed... Skipping kernel-5.9.11_1. kernel-headers package not installed... Regenerating initramfs, please wait... depmod: WARNING: could not open modules.order at /var/tmp/dracut.BJxh6X/initramfs/lib/modules/5.11.11_1: No such file or directory depmod: WARNING: could not open modules.builtin at /var/tmp/dracut.BJxh6X/initramfs/lib/modules/5.11.11_1: No such file or directory depmod: WARNING: could not open modules.order at /var/tmp/dracut.fyIoT7/initramfs/lib/modules/5.11.15_1: No such file or directory depmod: WARNING: could not open modules.builtin at /var/tmp/dracut.fyIoT7/initramfs/lib/modules/5.11.15_1: No such file or directory zfs-2.0.4_1: installed successfully. ``` On older systems, it takes quite some time for nothing. ### Steps to reproduce the behavior Install `zfs` on systems with LTS kernels only.