]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
devtool: support plugins with plugins
authorAdrian Freihofer <adrian.freihofer@gmail.com>
Mon, 22 Jan 2024 13:58:20 +0000 (14:58 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 2 Feb 2024 10:36:53 +0000 (10:36 +0000)
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 <adrian.freihofer@siemens.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/devtool

index 3aae7b93b4b531474c5a28f91499cd565cdf0e9f..60ea3e8298587b40a1c9bc09f1277b53d25c4f38 100755 (executable)
@@ -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='<subcommand>')