bitbake-setup: correctly define --global argument for settings management
PATCH 1/1 bitbake-setup: correctly define --global argument for settings management
From: Alexander Kanavin <[email protected]>
--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.
--- bin/bitbake-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
bin/bitbake-setup +1 -1
@@ -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)
Signature · 1 line
2.39.5
Quoted 17 lines · Alexander Kanavin via lists.openembedded.org
From: Alexander Kanavin <[email protected]>
--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.
Signed-off-by Alexander Kanavin <[email protected]>--- bin/bitbake-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)bin/bitbake-setup +0
-0
bin/bitbake-setup def main(): · line 791
Quoted 8 lines
bin/bitbake-setup +1
-1@@ -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)
Thanks, this fixes the issue reported on IRC. I was able to set settings either with bitbake-setup settings set --global, or bitbake-setup settings set, and global and build-dir settings were modified respectively. E.g.:
$ cat /home/builder/.config/bitbake-setup/settings.conf /home/builder/yp2/bitbake-builds/settings.conf [default] top-dir-prefix = /home/builder/yp2
[default]
top-dir-name = builds
$ bitbake-setup settings list
Loading settings from
/home/builder/.config/bitbake-setup/settings.confLoading settings from
/home/builder/yp2/bitbake-builds/settings.conf
default top-dir-prefix /home/builder/yp2
default top-dir-name builds
default registry /bitbake/default-registry
default dl-dir /home/builder/yp2/bitbake-builds/.bitbake-setup-downloads
Antonin
Signature · 3 lines
Antonin Godard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com