Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/4] Load devtool and reciptool plugins in a well-defined manner
@ 2016-10-25 11:03 Ola x Nilsson
  2016-10-25 11:03 ` [PATCH 1/4] devtool: selftest: add test for devtool plugin loading Ola x Nilsson
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Ola x Nilsson @ 2016-10-25 11:03 UTC (permalink / raw)
  To: olani, openembedded-core

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

Make devtool and recipetool load plugins in a well-defined and expected manner.

devtool and reciptool search for pluings first in scripts/lib/<tool>
and then in BBPATH.  Each found plugin is loaded, which means that any
plugin found later in BBPATH shadows previously loaded plugins.
plugin_init is loaded for all plugins, no matter whether they are
later replaced.  register_plugin is called once for each time a plugin
with a certain name is found, but it is always called on the last
loaded plugin.

Change the scriptutils.load_plugins function to never load a plugin
file if one with the same filename has already been loaded.  This
means that the first found plugin wins.

Change the load order to first search BBPATH and then
scripts/lib/tools.  This means that plugins in scripts/lib/<tool> can
be shadowed by plugins in layers.

Ola x Nilsson (4):
  devtool: selftest: add test for devtool plugin loading
  recipetool: selftest: Add test for recipetool plugin loading
  devtool: Load plugins in a well defined order
  recipetool: Load plugins in a well defined order

 meta-selftest/lib/devtool/bbpath.py    | 44 ++++++++++++++++++++++++++++++++++
 meta-selftest/lib/recipetool/bbpath.py | 41 +++++++++++++++++++++++++++++++
 meta/lib/oeqa/selftest/devtool.py      | 43 +++++++++++++++++++++++++++++++++
 meta/lib/oeqa/selftest/recipetool.py   | 44 ++++++++++++++++++++++++++++++++++
 scripts/devtool                        |  3 ++-
 scripts/lib/scriptutils.py             |  8 +++++--
 scripts/recipetool                     |  4 ++--
 7 files changed, 182 insertions(+), 5 deletions(-)
 create mode 100644 meta-selftest/lib/devtool/bbpath.py
 create mode 100644 meta-selftest/lib/recipetool/bbpath.py

-- 
2.1.4



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-12-08 15:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-25 11:03 [PATCH 0/4] Load devtool and reciptool plugins in a well-defined manner Ola x Nilsson
2016-10-25 11:03 ` [PATCH 1/4] devtool: selftest: add test for devtool plugin loading Ola x Nilsson
2016-10-25 11:03 ` [PATCH 2/4] recipetool: selftest: Add test for recipetool " Ola x Nilsson
2016-10-25 11:03 ` [PATCH 3/4] devtool: Load plugins in a well defined order Ola x Nilsson
2016-10-25 11:03 ` [PATCH 4/4] recipetool: " Ola x Nilsson
2016-12-06  7:37 ` [PATCH 0/4] Load devtool and reciptool plugins in a well-defined manner Ola x Nilsson
2016-12-07 21:16   ` Paul Eggleton
2016-12-08 15:24     ` Burton, Ross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox