From: Daan De Meyer Date: Fri, 8 Sep 2023 19:10:48 +0000 (+0200) Subject: Allow matching on output format X-Git-Tag: v17~13^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=443416b5e3179df912aee75f7fe8ae0eb3e27788;p=thirdparty%2Fmkosi.git Allow matching on output format --- diff --git a/mkosi/config.py b/mkosi/config.py index 1c310ae2d..9cc972b2f 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -963,6 +963,7 @@ SETTINGS = ( name="Format", section="Output", parse=config_make_enum_parser(OutputFormat), + match=config_make_enum_matcher(OutputFormat), default=OutputFormat.disk, choices=OutputFormat.values(), help="Output Format", diff --git a/mkosi/resources/mkosi.md b/mkosi/resources/mkosi.md index e5d7c8870..bbfb9b51f 100644 --- a/mkosi/resources/mkosi.md +++ b/mkosi/resources/mkosi.md @@ -323,6 +323,11 @@ boolean argument: either `1`, `yes`, or `true` to enable, or `0`, `no`, : Matches against the configured value for the `Bootable=` feature. Takes a boolean value or `auto`. +`Format=` + +: Matches against the configured value for the `Format=` option. Takes + an output format (see the `Format=` option). + | Matcher | Globs | Rich Comparisons | Default | |-----------------|-------|------------------|-------------------------| | `Distribution=` | no | no | match host distribution | @@ -331,6 +336,7 @@ boolean argument: either `1`, `yes`, or `true` to enable, or `0`, `no`, | `ImageId=` | yes | no | match fails | | `ImageVersion=` | no | yes | match fails | | `Bootable=` | no | no | match auto feature | +| `Format=` | no | no | match default format | ### [Preset] Section