From: Daan De Meyer Date: Thu, 7 Dec 2023 12:33:29 +0000 (+0100) Subject: Don't consider include filters when deciding whether to run depmod X-Git-Tag: v20~104^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2132%2Fhead;p=thirdparty%2Fmkosi.git Don't consider include filters when deciding whether to run depmod The include filters only do something if there's an exclude filter, so we don't need to run depmod if only include filters are defined. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 1ae70f872..81b77a4d8 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -1802,10 +1802,11 @@ def run_depmod(state: MkosiState) -> None: "modules.symbols.bin", ) - filters = state.config.kernel_modules_include or state.config.kernel_modules_exclude - for kver, _ in gen_kernel_images(state): - if not filters and all((state.root / "usr/lib/modules" / kver / o).exists() for o in outputs): + if ( + not state.config.kernel_modules_exclude and + all((state.root / "usr/lib/modules" / kver / o).exists() for o in outputs) + ): continue process_kernel_modules(