]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Fix config settings ordering
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 15 Dec 2023 09:39:38 +0000 (10:39 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 16 Dec 2023 17:59:15 +0000 (18:59 +0100)
Let's make sure this matches the order in the summary and MkosiConfig
class.

mkosi/config.py

index 516ada181f1183a809792f99f05342bf4d413c33..608e1b25bc20a15f541c84fe0ae4bad065e85cbb 100644 (file)
@@ -2021,6 +2021,89 @@ SETTINGS = (
         parse=config_make_list_parser(delimiter=",", parse=make_path_parser()),
         help="List of comma-separated paths to look for programs before looking in PATH",
     ),
+    MkosiConfigSetting(
+        dest="ephemeral",
+        metavar="BOOL",
+        section="Host",
+        parse=config_parse_boolean,
+        help=('If specified, the container/VM is run with a temporary snapshot of the output '
+                'image that is removed immediately when the container/VM terminates'),
+        nargs="?",
+    ),
+    MkosiConfigSetting(
+        dest="credentials",
+        long="--credential",
+        metavar="NAME=VALUE",
+        section="Host",
+        parse=config_make_list_parser(delimiter=" "),
+        help="Pass a systemd credential to systemd-nspawn or qemu",
+    ),
+    MkosiConfigSetting(
+        dest="kernel_command_line_extra",
+        metavar="OPTIONS",
+        section="Host",
+        parse=config_make_list_parser(delimiter=" "),
+        help="Append extra entries to the kernel command line when booting the image",
+    ),
+    MkosiConfigSetting(
+        dest="acl",
+        metavar="BOOL",
+        nargs="?",
+        section="Host",
+        parse=config_parse_boolean,
+        help="Set ACLs on generated directories to permit the user running mkosi to remove them",
+    ),
+    MkosiConfigSetting(
+        dest="tools_tree",
+        metavar="PATH",
+        section="Host",
+        parse=config_make_path_parser(required=False),
+        paths=("mkosi.tools",),
+        help="Look up programs to execute inside the given tree",
+    ),
+    MkosiConfigSetting(
+        dest="tools_tree_distribution",
+        metavar="DISTRIBUTION",
+        section="Host",
+        parse=config_make_enum_parser(Distribution),
+        help="Set the distribution to use for the default tools tree",
+    ),
+    MkosiConfigSetting(
+        dest="tools_tree_release",
+        metavar="RELEASE",
+        section="Host",
+        parse=config_parse_string,
+        help="Set the release to use for the default tools tree",
+    ),
+    MkosiConfigSetting(
+        dest="tools_tree_mirror",
+        metavar="MIRROR",
+        section="Host",
+        help="Set the mirror to use for the default tools tree",
+    ),
+    MkosiConfigSetting(
+        dest="tools_tree_packages",
+        long="--tools-tree-package",
+        metavar="PACKAGE",
+        section="Host",
+        parse=config_make_list_parser(delimiter=","),
+        help="Add additional packages to the default tools tree",
+    ),
+    MkosiConfigSetting(
+        dest="runtime_trees",
+        long="--runtime-tree",
+        metavar="SOURCE:[TARGET]",
+        section="Host",
+        parse=config_make_list_parser(delimiter=",", parse=make_tree_parser(absolute=False)),
+        help="Additional mounts to add when booting the image",
+    ),
+    MkosiConfigSetting(
+        dest="runtime_size",
+        metavar="SIZE",
+        section="Host",
+        parse=config_parse_bytes,
+        help="Grow disk images to the specified size before booting them",
+    ),
     MkosiConfigSetting(
         dest="qemu_gui",
         metavar="BOOL",
@@ -2125,89 +2208,6 @@ SETTINGS = (
         # arguments.
         help=argparse.SUPPRESS,
     ),
-    MkosiConfigSetting(
-        dest="ephemeral",
-        metavar="BOOL",
-        section="Host",
-        parse=config_parse_boolean,
-        help=('If specified, the container/VM is run with a temporary snapshot of the output '
-                'image that is removed immediately when the container/VM terminates'),
-        nargs="?",
-    ),
-    MkosiConfigSetting(
-        dest="credentials",
-        long="--credential",
-        metavar="NAME=VALUE",
-        section="Host",
-        parse=config_make_list_parser(delimiter=" "),
-        help="Pass a systemd credential to systemd-nspawn or qemu",
-    ),
-    MkosiConfigSetting(
-        dest="kernel_command_line_extra",
-        metavar="OPTIONS",
-        section="Host",
-        parse=config_make_list_parser(delimiter=" "),
-        help="Append extra entries to the kernel command line when booting the image",
-    ),
-    MkosiConfigSetting(
-        dest="acl",
-        metavar="BOOL",
-        nargs="?",
-        section="Host",
-        parse=config_parse_boolean,
-        help="Set ACLs on generated directories to permit the user running mkosi to remove them",
-    ),
-    MkosiConfigSetting(
-        dest="tools_tree",
-        metavar="PATH",
-        section="Host",
-        parse=config_make_path_parser(required=False),
-        paths=("mkosi.tools",),
-        help="Look up programs to execute inside the given tree",
-    ),
-    MkosiConfigSetting(
-        dest="tools_tree_distribution",
-        metavar="DISTRIBUTION",
-        section="Host",
-        parse=config_make_enum_parser(Distribution),
-        help="Set the distribution to use for the default tools tree",
-    ),
-    MkosiConfigSetting(
-        dest="tools_tree_release",
-        metavar="RELEASE",
-        section="Host",
-        parse=config_parse_string,
-        help="Set the release to use for the default tools tree",
-    ),
-    MkosiConfigSetting(
-        dest="tools_tree_mirror",
-        metavar="MIRROR",
-        section="Host",
-        help="Set the mirror to use for the default tools tree",
-    ),
-    MkosiConfigSetting(
-        dest="tools_tree_packages",
-        long="--tools-tree-package",
-        metavar="PACKAGE",
-        section="Host",
-        parse=config_make_list_parser(delimiter=","),
-        help="Add additional packages to the default tools tree",
-    ),
-    MkosiConfigSetting(
-        dest="runtime_trees",
-        long="--runtime-tree",
-        metavar="SOURCE:[TARGET]",
-        section="Host",
-        parse=config_make_list_parser(delimiter=",", parse=make_tree_parser(absolute=False)),
-        help="Additional mounts to add when booting the image",
-    ),
-    MkosiConfigSetting(
-        dest="runtime_size",
-        metavar="SIZE",
-        section="Host",
-        parse=config_parse_bytes,
-        help="Grow disk images to the specified size before booting them",
-    ),
 )
 SETTINGS_LOOKUP_BY_NAME = {name: s for s in SETTINGS for name in [s.name, *s.compat_names]}
 SETTINGS_LOOKUP_BY_DEST = {s.dest: s for s in SETTINGS}