[OE-core] [PATCH] devtool: Only register each plugin once

Ola x Nilsson ola.x.nilsson at axis.com
Mon Oct 10 14:19:11 UTC 2016


When a devtool plugin is shadowed in a higher-priorty layer the
register_commands method was called on the shadowing plugin once for
each found plugin with that name.  A simple unique operation on the list
of loaded plugins solves that problem.  It may still be a problem that
each plugin - shadowed or not - is loaded and initialized.

Signed-off-by: Ola x Nilsson <ola.x.nilsson at axis.com>
---
 scripts/devtool | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/devtool b/scripts/devtool
index 0c32c50..7b134a6 100755
--- a/scripts/devtool
+++ b/scripts/devtool
@@ -317,7 +317,7 @@ def main():
         parser_create_workspace.add_argument('--create-only', action="store_true", help='Only create the workspace layer, do not alter configuration')
         parser_create_workspace.set_defaults(func=create_workspace, no_workspace=True)
 
-    for plugin in plugins:
+    for plugin in set(plugins):
         if hasattr(plugin, 'register_commands'):
             plugin.register_commands(subparsers, context)
 
-- 
2.1.4




More information about the Openembedded-core mailing list