]> code.ossystems Code Review - openembedded-core.git/commitdiff
recipetool: Load plugins in a well defined order
authorOla x Nilsson <ola.x.nilsson@axis.com>
Tue, 25 Oct 2016 11:03:35 +0000 (13:03 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 13 Dec 2016 22:47:29 +0000 (22:47 +0000)
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@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/recipetool

index 1052cd2b22ce13c12f2ffbe2a824e48086456704..00c9007b1c41f9536d3bd41f198166c3298d6b91 100755 (executable)
@@ -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)