Hi,

This patchset contains refactoring of wic plugin system. It hopefully
makes the code more understandable and easier to read and maintain.
It reduced plugin system API to only one call: get_plugins, speed up
the system by using lazy evaluation of plugin info, shortened the code
and moved it to one module.

This is a last patchset of wic refactoring series. Although there are still
some places in wic code that I'd like to optimize, I decided to stop here.
The code looks more maintainable for me now and even though I want to make it
much better I have other tasks to do and important bugs to fix.

Just in case anybody is interested in continuing to refactor wic code I can 
point
out to the areas that still require refactoring from my point of view:
- make use of ArgumentParser: bug #9636
- refactor engine.py and help.py
- replace plugin code that configures bootloaders with using configuration
  files (--configfile .wks option)
- refactor source plugins
- get rid of custom runner module in favor of using subprocess
- move the rest of code from utils/ subdirectory to lib/wic/utils.py

The following changes since commit e4e061bbdadce3f4fe420768bb132f6aac5fca56:

  wic: move WicError to lib/wic/__init__.py (2017-02-16 13:24:03 +0200)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib ed/wic/wip
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wic/wip

Ed Bartosh (10):
  wic: use PluginMgr directly
  wic: remove PluginMgr.get_source_plugins
  wic: reimplement PluginMgr.get_plugin_methods
  wic: reimplement PluginMgr.get_plugins
  wic: pluginbase: use python 3 metaclass syntax
  wic: throw exception if required API is not implemented
  wic: remove PluginMgr.get_plugin_methods
  wic: plugin: cache results in get_plugins
  wic: move PluginMgr class to pluginbase
  wic: pluginbase: use global dictionary

 scripts/lib/wic/engine.py                |   6 +-
 scripts/lib/wic/help.py                  |  11 +--
 scripts/lib/wic/partition.py             |  27 ++----
 scripts/lib/wic/plugin.py                | 151 -------------------------------
 scripts/lib/wic/pluginbase.py            |  59 ++++++++++--
 scripts/lib/wic/plugins/imager/direct.py |  13 +--
 6 files changed, 73 insertions(+), 194 deletions(-)
 delete mode 100644 scripts/lib/wic/plugin.py

-- 
Regards,
Ed

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to