From: Daan De Meyer Date: Tue, 19 Mar 2024 09:30:20 +0000 (+0100) Subject: kmod: Simplify resolve_module_dependencies() slightly X-Git-Tag: v23~77^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4dd8075502ba2800e38b7a9587c4bfe265e17ce3;p=thirdparty%2Fmkosi.git kmod: Simplify resolve_module_dependencies() slightly --- diff --git a/mkosi/kmod.py b/mkosi/kmod.py index 6dc82e330..72b1516a4 100644 --- a/mkosi/kmod.py +++ b/mkosi/kmod.py @@ -74,9 +74,9 @@ def resolve_module_dependencies( of module names (including the given module paths themselves). The paths are returned relative to the root directory. """ - modulesd = Path("usr/lib/modules") / kver - builtin = set(module_path_to_name(Path(m)) for m in (root / modulesd / "modules.builtin").read_text().splitlines()) - allmodules = set((root / modulesd / "kernel").rglob("*.ko*")) + modulesd = root / "usr/lib/modules" / kver + builtin = set(module_path_to_name(Path(m)) for m in (modulesd / "modules.builtin").read_text().splitlines()) + allmodules = set((modulesd / "kernel").rglob("*.ko*")) nametofile = {module_path_to_name(m): m for m in allmodules} log_step("Running modinfo to fetch kernel module dependencies")