diff options
Diffstat (limited to 'scripts/devtool')
| -rwxr-xr-x | scripts/devtool | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/scripts/devtool b/scripts/devtool index 91e3954dbb..c9ad9ddb95 100755 --- a/scripts/devtool +++ b/scripts/devtool @@ -187,7 +187,7 @@ def _create_workspace(workspacedir, config, basepath): f.write('directly (although recipes added with "devtool add" will often need\n') f.write('direct modification.)\n') f.write('\nIf you no longer need to use devtool or the workspace layer\'s contents\n') - f.write('you can remove the path to this workspace layer from your conf/bblayers.conf') + f.write('you can remove the path to this workspace layer from your conf/bblayers.conf\n') f.write('file (and then delete the layer, if you wish).\n') f.write('\nNote that by default, if devtool fetches and unpacks source code, it\n') f.write('will place it in a subdirectory of a "sources" subdirectory of the\n') @@ -215,6 +215,9 @@ def main(): global config global context + if sys.getfilesystemencoding() != "utf-8": + sys.exit("Please use a locale setting which supports utf-8.\nPython can't change the filesystem locale after loading so we need a utf-8 when python starts or things won't work.") + context = Context(fixed_setup=False) # Default basepath @@ -288,13 +291,17 @@ def main(): scriptutils.logger_setup_color(logger, global_args.color) if global_args.bbpath is None: - tinfoil = setup_tinfoil(config_only=True, basepath=basepath) try: - global_args.bbpath = tinfoil.config_data.getVar('BBPATH', True) - finally: - tinfoil.shutdown() - - for path in [scripts_path] + global_args.bbpath.split(':'): + tinfoil = setup_tinfoil(config_only=True, basepath=basepath) + try: + global_args.bbpath = tinfoil.config_data.getVar('BBPATH') + finally: + tinfoil.shutdown() + except bb.BBHandledException: + return 2 + + # Search BBPATH first to allow layers to override plugins in scripts_path + for path in global_args.bbpath.split(':') + [scripts_path]: pluginpath = os.path.join(path, 'lib', 'devtool') scriptutils.load_plugins(logger, plugins, pluginpath) |
