From: Michael Ferrari Date: Wed, 15 May 2024 08:02:18 +0000 (+0200) Subject: Prefer `config.image` over `config.image_id` X-Git-Tag: v23.1~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01a67720604575175ec695dbb92d51b94c505d1c;p=thirdparty%2Fmkosi.git Prefer `config.image` over `config.image_id` When using `mkosi.images` it makes more sense to use the `image` name, as that is what identifies the different images. --- diff --git a/mkosi/config.py b/mkosi/config.py index 100d006ca..4bfb468e7 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -689,7 +689,7 @@ def config_default_compression(namespace: argparse.Namespace) -> Compression: def config_default_output(namespace: argparse.Namespace) -> str: - output = namespace.image_id or namespace.image or "image" + output = namespace.image or namespace.image_id or "image" if namespace.image_version: output += f"_{namespace.image_version}" @@ -1523,7 +1523,7 @@ class Config: image: Optional[str] def name(self) -> str: - return self.image_id or self.image or "default" + return self.image or self.image_id or "default" def machine_or_name(self) -> str: return self.machine or self.name()