[OE-core] [PATCH 4/4] recipetool: Load plugins in a well defined order

Ola x Nilsson ola.x.nilsson at axis.com
Tue Oct 25 11:03:35 UTC 2016


From: Ola x Nilsson <ola.x.nilsson at axis.com>

To allow recipetool plugins in one layer to shadow another in a well
defined way, first search BBPATH/lib/recipetool directories and then
scripts/lib/recipetool and load only the first found.

The previous search and load loop would load all found plugins with the
ones found later replacing any found before.

Signed-off-by: Ola x Nilsson <ola.x.nilsson at axis.com>
---
 scripts/recipetool | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/recipetool b/scripts/recipetool
index 1052cd2..00c9007 100755
--- a/scripts/recipetool
+++ b/scripts/recipetool
@@ -78,8 +78,8 @@ def main():
 
     tinfoil = tinfoil_init(False)
     try:
-        for path in ([scripts_path] +
-                    tinfoil.config_data.getVar('BBPATH', True).split(':')):
+        for path in (tinfoil.config_data.getVar('BBPATH', True).split(':')
+                     + [scripts_path]):
             pluginpath = os.path.join(path, 'lib', 'recipetool')
             scriptutils.load_plugins(logger, plugins, pluginpath)
 
-- 
2.1.4




More information about the Openembedded-core mailing list