bitbake: bitbake-setup: correctly define --global argument for settings management

--global was defined twice (for settings command as a whole, and specifically
for set/unset sub-commands), which caused 'settings --global set ...' to
be allowed, and at the same time not have any effect. 'settings set --global'
is the only valid form after this change.

(Bitbake rev: 2f14cf68f6c653b6da90180a99a22c58855b0cef)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Tested-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexander Kanavin 2025-10-27 15:16:27 +01:00 committed by Richard Purdie
parent 1effe32357
commit 18c39854ef

View File

@ -785,7 +785,7 @@ def main():
parser_settings_arg_global = argparse.ArgumentParser(add_help=False)
parser_settings_arg_global.add_argument('--global', action='store_true', help="Modify the setting in a global settings file, rather than one specific to a top directory")
parser_settings = subparsers.add_parser('settings', parents=[parser_settings_arg_global],
parser_settings = subparsers.add_parser('settings',
help='List current settings, or set or unset a setting in a settings file (e.g. the default prefix and name of the top directory, the location of build configuration registry, downloads directory and other settings specific to a top directory)')
parser_settings.set_defaults(func=settings_func)