]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Fix kernel module glob
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 15 Mar 2024 16:13:45 +0000 (17:13 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 15 Mar 2024 16:42:55 +0000 (17:42 +0100)
When dkms modules are installed there will be .ko modules in directories
other than "kernel" so make sure we only look for modules in the "kernel"
directory.

mkosi/kmod.py

index 1c958d3d593dde41c91b726c88bb2fabac38ecbc..ffbe302492faa271c23c577fa6f2dba2f282b576 100644 (file)
@@ -25,7 +25,7 @@ def filter_kernel_modules(
     host: bool,
 ) -> list[Path]:
     modulesd = root / "usr/lib/modules" / kver
-    modules = {m for m in modulesd.rglob("*.ko*")}
+    modules = set((modulesd / "kernel").rglob("*.ko*"))
 
     if host:
         include = [*include, *loaded_modules()]