[OE-core] [wic][PATCH 00/14] Python 3 support

Ed Bartosh ed.bartosh at linux.intel.com
Wed May 4 13:06:13 UTC 2016


Hi,

This is a first set of changes implementing Python 3 support for wic.
As bitbake codebase is not ported to Python 3 yet I tried to avoid
using bitbake APIs as much as possible.
With this set of changes wic can be run on both Python 2 and Python 3.

These commands work and produce rootfs of the same size:
python3.4 ../scripts/wic create my-kickstart-file.wks -e core-image-minimal -v ./tmp/sysroots/qemux86-64/imgdata/ -o img/
python2.7 ../scripts/wic create my-kickstart-file.wks -e core-image-minimal -v ./tmp/sysroots/qemux86-64/imgdata/ -o img/

Functionality that requires bb/lib such es wic -e <image> doesn't work.

The following changes since commit 7587285a21cd1e3465640bf9871f3fd65cca4e07:

  scripts/lib/bsp/kernel.py: force patching when branch is machine branch is re-use (2016-04-29 12:11:20 +0100)

are available in the git repository at:

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

Ed Bartosh (14):
  wic: replace print statements with print function
  wic: use items instead of iteritems
  wic: don't use dict.keys and dict.has_key
  wic: don't inherit classes from object
  wic: remove with_statement imports
  wic: use new syntax of 'except' statement
  wic: remove unused functions
  wic: refactor pluginbase
  wic: don't use L suffix for integers
  wic: use find_executable in favor of bb.utils.which
  wic: use // operator instead of /
  wic: decode output of subprocess.communicate
  wic: don't encode unicode strings
  wic: use next builtin instead of .next method

 scripts/lib/wic/conf.py                |  2 +-
 scripts/lib/wic/creator.py             |  4 +-
 scripts/lib/wic/engine.py              | 20 ++++-----
 scripts/lib/wic/filemap.py             | 16 +++----
 scripts/lib/wic/help.py                |  4 +-
 scripts/lib/wic/imager/baseimager.py   |  5 +--
 scripts/lib/wic/imager/direct.py       |  2 +-
 scripts/lib/wic/ksparser.py            | 10 ++---
 scripts/lib/wic/msger.py               | 78 +---------------------------------
 scripts/lib/wic/partition.py           |  2 +-
 scripts/lib/wic/plugin.py              | 10 ++---
 scripts/lib/wic/pluginbase.py          | 42 ++++++------------
 scripts/lib/wic/utils/oe/misc.py       | 18 +++-----
 scripts/lib/wic/utils/partitionedfs.py | 14 +++---
 scripts/lib/wic/utils/runner.py        |  6 +--
 scripts/wic                            | 43 ++++++++++---------
 16 files changed, 91 insertions(+), 185 deletions(-)

-- 
2.1.4




More information about the Openembedded-core mailing list