Skip to content

Load devtool and reciptool plugins in a well-defined manner

Ola x Nilsson openembedded-core 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4devtool: selftest: add test for devtool plugin loadingmeta-selftest/lib/devtool/bbpath.py meta/lib/oeqa/selftest/devtool.py+87 -00 replies
2/4recipetool: selftest: Add test for recipetool plugin loadingmeta-selftest/lib/recipetool/bbpath.py meta/lib/oeqa/selftest/recipetool.py+85 -00 replies
3/4devtool: Load plugins in a well defined orderscripts/devtool scripts/lib/scriptutils.py+8 -30 replies
4/4recipetool: Load plugins in a well defined orderscripts/recipetool+2 -20 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPaul Eggleton
SeriesA-b
1/4
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] Load devtool and reciptool plugins in a well-defined manner

From: Ola x Nilsson <[email protected]>

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
Signature · 1 line
2.1.4