@@ -30,6 +30,12 @@ import bb.process
logger = bb.msg.logger_create('bitbake-setup', sys.stdout)
+# These settings can only be set in the global context
+GLOBAL_ONLY_SETTINGS = (
+ "top-dir-prefix",
+ "top-dir-name",
+)
+
def cache_dir(top_dir):
return os.path.join(top_dir, '.bitbake-setup-cache')
@@ -685,6 +691,9 @@ def load_settings(settings_path):
def change_setting(top_dir, args):
if vars(args)['global']:
settings_path = global_settings_path(args)
+ elif args.setting in GLOBAL_ONLY_SETTINGS:
+ print(f"{args.setting} can only be set in the global config; '--global' is implied")
+ settings_path = global_settings_path(args)
else:
settings_path = topdir_settings_path(top_dir)
settings = load_settings(settings_path)
top-dir-prefix and top-dir-name only make sense to be set in the global settings file, so if they are specified force them to the global settings file, and warn the user that this is happening. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> --- bin/bitbake-setup | 9 +++++++++ 1 file changed, 9 insertions(+)