]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Add Architecture match
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 28 Sep 2023 10:45:56 +0000 (12:45 +0200)
committerJörg Behrmann <behrmann@physik.fu-berlin.de>
Thu, 28 Sep 2023 10:57:01 +0000 (12:57 +0200)
mkosi/config.py
mkosi/resources/mkosi.md

index 46e2452aa0cdb8ef8641a1957c2ecccd94e73e20..d4e4c89dae40449b1fe1c4f7b6edfe81b5615915 100644 (file)
@@ -969,6 +969,7 @@ SETTINGS = (
         dest="architecture",
         section="Distribution",
         parse=config_make_enum_parser(Architecture),
+        match=config_make_enum_matcher(Architecture),
         default=Architecture.native(),
         choices=Architecture.values(),
         help="Override the architecture of installation",
index a41d2e6dcc9918f421bd353768394c79b1b54f52..f61e00c921a756353eaa0de7c73f57a955b2f840 100644 (file)
@@ -304,6 +304,12 @@ boolean argument: either `1`, `yes`, or `true` to enable, or `0`, `no`,
 : Matches against the configured distribution release. If this condition is used and no distribution has been
   explicitly configured yet, the host distribution and release are used.
 
+`Architecture=`
+
+: Matches against the configured architecture. If this condition is used
+  and no architecture has been explicitly configured yet, the host
+  architecture is used.
+
 `PathExists=`
 
 : This condition is satisfied if the given path exists. Relative paths are interpreted relative to the parent
@@ -342,6 +348,7 @@ boolean argument: either `1`, `yes`, or `true` to enable, or `0`, `no`,
 |-------------------|-------|------------------|-------------------------|
 | `Distribution=`   | no    | no               | match host distribution |
 | `Release=`        | no    | no               | match host release      |
+| `Architecture=`   | no    | no               | match host architecture |
 | `PathExists=`     | no    | no               | match fails             |
 | `ImageId=`        | yes   | no               | match fails             |
 | `ImageVersion=`   | no    | yes              | match fails             |