From: Daan De Meyer Date: Fri, 13 Feb 2026 08:02:47 +0000 (+0100) Subject: config: Make sure we write finalized values into the history X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=feaeecba95ccb90f69e6fb16565f5223ac8b5c13;p=thirdparty%2Fmkosi.git config: Make sure we write finalized values into the history Otherwise if we specify e.g. --package-directories= on the command line it'll get written as None into the history and won't get parsed properly by Config.from_partial_json(). --- diff --git a/mkosi/config.py b/mkosi/config.py index fbcc799e8..0de06c083 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -5376,11 +5376,14 @@ def parse_config( context.cli |= history - cli = copy.deepcopy(context.cli) - # One of the specifiers needs access to the directory, so make sure it is available. context.config["directory"] = args.directory + cli = copy.deepcopy(context.cli) + for dest in cli: + if dest in SETTINGS_LOOKUP_BY_DEST: + cli[dest] = context.finalize_value(SETTINGS_LOOKUP_BY_DEST[dest]) + context.parse_new_includes() context.config["files"] = []