]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Allow matching on output format
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 8 Sep 2023 19:10:48 +0000 (21:10 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 9 Sep 2023 12:37:35 +0000 (14:37 +0200)
mkosi/config.py
mkosi/resources/mkosi.md

index 1c310ae2d16f0bf536d7795c39f8c85864f1351c..9cc972b2fba8cbc536e7cd318b3f4d8ae575f8e9 100644 (file)
@@ -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",
index e5d7c88706a5b67a40357d0f23dbd261adbc75ed..bbfb9b51f4474b85722ec0860b55c4be90fddb04 100644 (file)
@@ -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