From: Daan De Meyer Date: Wed, 24 Jul 2024 13:41:15 +0000 (+0200) Subject: Handle softdep module dependencies properly X-Git-Tag: v24~8^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eb3688ab3607ebbdd22771e391e88f639d8e6ded;p=thirdparty%2Fmkosi.git Handle softdep module dependencies properly The softdep lines are formatted a little differently and can contain pre: and post: so we need to make sure we handle all those cases. --- diff --git a/mkosi/kmod.py b/mkosi/kmod.py index a2ba13ca7..1183c5438 100644 --- a/mkosi/kmod.py +++ b/mkosi/kmod.py @@ -106,9 +106,14 @@ def resolve_module_dependencies( if not sep: key, sep, value = line.partition("=") - if key in ("depends", "softdep"): + if key == "depends": depends += [normalize_module_name(d) for d in value.strip().split(",") if d] + elif key == "softdep": + # softdep is delimited by spaces and can contain strings like pre: and post: so discard anything that + # ends with a colon. + depends += [normalize_module_name(d) for d in value.strip().split() if not d.endswith(":")] + elif key == "firmware": fw = [f for f in Path("usr/lib/firmware").glob(f"{value.strip()}*")] if not fw: