Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 00/10] #10619: wic refactoring (done)
Date: Thu, 16 Feb 2017 17:33:27 +0200	[thread overview]
Message-ID: <cover.1487257345.git.ed.bartosh@linux.intel.com> (raw)

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



             reply	other threads:[~2017-02-16 15:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-16 15:33 Ed Bartosh [this message]
2017-02-16 15:33 ` [PATCH 01/10] wic: use PluginMgr directly Ed Bartosh
2017-02-16 15:33 ` [PATCH 02/10] wic: remove PluginMgr.get_source_plugins Ed Bartosh
2017-02-16 15:33 ` [PATCH 03/10] wic: reimplement PluginMgr.get_plugin_methods Ed Bartosh
2017-02-16 15:33 ` [PATCH 04/10] wic: reimplement PluginMgr.get_plugins Ed Bartosh
2017-02-16 15:33 ` [PATCH 05/10] wic: pluginbase: use python 3 metaclass syntax Ed Bartosh
2017-02-16 15:33 ` [PATCH 06/10] wic: throw exception if required API is not implemented Ed Bartosh
2017-02-16 15:33 ` [PATCH 07/10] wic: remove PluginMgr.get_plugin_methods Ed Bartosh
2017-02-16 15:33 ` [PATCH 08/10] wic: plugin: cache results in get_plugins Ed Bartosh
2017-02-16 15:33 ` [PATCH 09/10] wic: move PluginMgr class to pluginbase Ed Bartosh
2017-02-16 15:33 ` [PATCH 10/10] wic: pluginbase: use global dictionary Ed Bartosh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1487257345.git.ed.bartosh@linux.intel.com \
    --to=ed.bartosh@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox