#10619: wic refactoring (done)
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest10 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | wic: use PluginMgr directlyscripts/ scripts/ scripts/ +2 more | +47 | 0 replies | |
| 2/10 | wic: remove PluginMgr.get_source_pluginsscripts/ scripts/ scripts/ | +2 | 0 replies | |
| 3/10 | wic: reimplement PluginMgr.get_plugin_methodsscripts/ scripts/ scripts/ +1 more | +20 | 0 replies | |
| 4/10 | wic: reimplement PluginMgr.get_pluginsscripts/ | +27 | 0 replies | |
| 5/10 | wic: pluginbase: use python 3 metaclass syntaxscripts/ | +2 | 0 replies | |
| 6/10 | wic: throw exception if required API is not implementedscripts/ | +6 | 0 replies | |
| 7/10 | wic: remove PluginMgr.get_plugin_methodsscripts/ scripts/ scripts/ +1 more | +13 | 0 replies | |
| 8/10 | wic: plugin: cache results in get_pluginsscripts/ | +12 | 0 replies | |
| 9/10 | wic: move PluginMgr class to pluginbasescripts/ scripts/ scripts/ +3 more | +48 | 0 replies | |
| 10/10 | wic: pluginbase: use global dictionaryscripts/ | +15 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/10] #10619: wic refactoring (done)
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
Signature · 2 lines
Regards, Ed