From: Daan De Meyer Date: Fri, 15 Dec 2023 09:39:38 +0000 (+0100) Subject: Fix config settings ordering X-Git-Tag: v20~57^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4af434c6486d16ac7cf9419c962ea3346fd9a357;p=thirdparty%2Fmkosi.git Fix config settings ordering Let's make sure this matches the order in the summary and MkosiConfig class. --- diff --git a/mkosi/config.py b/mkosi/config.py index 516ada181..608e1b25b 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -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}