From: Adrian Freihofer Date: Mon, 22 Jan 2024 13:58:20 +0000 (+0100) Subject: devtool: support plugins with plugins X-Git-Tag: uninative-4.4~315 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9c3c996f2e9a52462c4426f394798a211e53ae1;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git devtool: support plugins with plugins Pass the plugins search path to plugins via context. This allows plugins to search for their own plugins at the same paths. Signed-off-by: Adrian Freihofer Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- diff --git a/scripts/devtool b/scripts/devtool index 3aae7b93b4b..60ea3e82985 100755 --- a/scripts/devtool +++ b/scripts/devtool @@ -299,8 +299,9 @@ def main(): 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') + pluginpaths = [os.path.join(path, 'lib', 'devtool') for path in global_args.bbpath.split(':') + [scripts_path]] + context.pluginpaths = pluginpaths + for pluginpath in pluginpaths: scriptutils.load_plugins(logger, plugins, pluginpath) subparsers = parser.add_subparsers(dest="subparser_name", title='subcommands', metavar='')