[OE-core] [wic][PATCH 02/20] wic: Test rootfs plugin using image recipes

2015-06-29 Thread Ed Bartosh
Added canned wks and testcase to create multi-rootfs images referring bitbake image recipes. Signed-off-by: Ed Bartosh create mode 100644 scripts/lib/image/canned-wks/directdisk-multi-rootfs.wks diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py index 5385562..3cfc2ff

[OE-core] [wic][PATCH 04/20] wic: Refactor getting bitbake variables

2015-06-29 Thread Ed Bartosh
un only once and results are parsed only once per requested set of variables. get_bitbake_var became the only API call. It replaces find_artifacts, find_artifact, find_bitbake_env_lines, get_bitbake_env_lines, set_bitbake_env_lines and get_line_val calls making API much more clear. Signed-off-by: Ed

[OE-core] [wic][PATCH 15/20] wic: Add --uuid partition option

2015-06-29 Thread Ed Bartosh
Added --uuid option to the configuration of wks parser. This option specifies partition UUID. The code to process it is already in place. It was implemented for --use-uuid option. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py index c8b2fab..0666d80

[OE-core] [wic][PATCH 08/20] wic: Refactor prepare_rootfs API

2015-06-29 Thread Ed Bartosh
Moved code out of prepare_roots* methods to avoid code duplication. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py index 324ea69..489ebe3 100644 --- a/scripts/lib/wic/kickstart

[OE-core] [wic][PATCH 09/20] wic: Rename partition images

2015-06-29 Thread Ed Bartosh
Renamed partition images into .p This should make output directory look more organized and easier to understand. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py index e093ec5..d61087a 100644 --- a/scripts/lib/wic/utils

[OE-core] [wic][PATCH 06/20] wic: Remove annoing debug message

2015-06-29 Thread Ed Bartosh
Wic tries to find plugins in every layer and prints a message 'Plugin dir is not a directory or does not exist' if layer doesn't have plugin dir. It causes a lot of duplicated messages in the debug output, which makes it hard to find useful info there. Signed-off-by: Ed Bartosh

[OE-core] [wic][PATCH 00/20] miscellaneous fixes. poky-conrib:ed/wic/misc

2015-06-29 Thread Ed Bartosh
Hi, This patchset includes usability fixes, new functionality, code cleanup, refactoring and 2 new test cases for wic. The work was done during verification of multi-rootfs EFI images. Fixes YOCTO #7854 and #7912 Ed Bartosh (20): wic: Fix misleading message wic: Test rootfs plugin using

[OE-core] [wic][PATCH 11/20] wic: Call methods better way

2015-06-29 Thread Ed Bartosh
Shortened code by using getattr to obtain a method to call for prepare_empty_partition_* and prepare_rootfs_* methods. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py index e3ae3ce..0741bb2

[OE-core] [wic][PATCH 19/20] wic: Code cleanup: long lines, identation and whitespaces

2015-06-29 Thread Ed Bartosh
Fixed pylint warnings bad-continuation, bad-continuation and line-too-long. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py index 92dcc5a..0dc7920 100644 --- a/scripts/lib/image/engine.py +++ b/scripts/lib/image/engine.py @@ -236,7 +236,10 @@ def

[OE-core] [wic][PATCH 20/20] wic: Code cleanup: unused imports

2015-06-29 Thread Ed Bartosh
Fixed pylint warning unused-import Signed-off-by: Ed Bartosh diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py index 0dc7920..73e8f8b 100644 --- a/scripts/lib/image/engine.py +++ b/scripts/lib/image/engine.py @@ -30,18 +30,10 @@ import os import sys -from abc import

[OE-core] [wic][PATCH 17/20] wic: Remove __write_partition method

2015-06-29 Thread Ed Bartosh
Moved code of __write_partition to 'assemble' method. This way it should be more readable. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py index d61087a..ca4b1f0 100644 --- a/scripts/lib/wic/utils/partitionedf

[OE-core] [wic][PATCH 18/20] wic: Fix confusing error message

2015-06-29 Thread Ed Bartosh
issed artifacts. Now the message looks like this: The following build artifacts are not specified: bootimg-dir, kernel-dir, native-sysroot [YOCTO #7912] Signed-off-by: Ed Bartosh diff --git a/scripts/wic b/scripts/wic index b75d122..ac272c6 100755 --- a/scripts/wic +++ b/scripts/wic @@ -1

[OE-core] [wic][PATCH 16/20] wic: Refactor fstab update code

2015-06-29 Thread Ed Bartosh
Made the code to backup and restore fstab only if it's modified. Cleaned up the code. Made it more pythonic. Improved code readability by moving code from several tiny methods into one place. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/i

[OE-core] [wic][PATCH 13/20] wic: Remove duplicated code

2015-06-29 Thread Ed Bartosh
Moved duplicated code of geting rootfs size out of prepare_rootfs* methods. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py index 4e8a6a8..72f617a 100644 --- a/scripts/lib/wic/kickstart

[OE-core] [wic][PATCH 14/20] wic: Fix naming conflict

2015-06-29 Thread Ed Bartosh
Image file name is not unique for the partitions without label. This causes image being rewritten and used as a source for all partitions without label. Wic produces broken or incorrect result images because of that. Added wks line number to the image name to make it unique. Signed-off-by: Ed

[OE-core] [wic][PATCH 12/20] wic: Refactor prepare_empty_partition API

2015-06-29 Thread Ed Bartosh
Moved code out of prepare_empty_partition* methods to avoid code duplication. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py index 0741bb2..4e8a6a8 100644 --- a/scripts/lib/wic/kickstart

[OE-core] [wic][PATCH 10/20] wic: Get rid of useless variable 'image_rootfs'

2015-06-29 Thread Ed Bartosh
Removed useless variable 'image_rootfs' from 4 prepare_rootfs_* methods. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py index 489ebe3..e3ae3ce 100644 --- a/scripts/lib/wic

[OE-core] [wic][PATCH 07/20] wic: Turn off debug output for 'bitbake -e'

2015-06-29 Thread Ed Bartosh
Switched debug level to 'normal' to prevent huge 'bitbake -e' output to go into wic debug output. This should help to make wic debug info much more clean and easier to read. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/wic/utils/oe/misc.py b/scripts/lib/wic/utils/oe/m

Re: [OE-core] [wic][PATCH 04/20] wic: Refactor getting bitbake variables

2015-06-30 Thread Ed Bartosh
Hi Cristopher, On Mon, Jun 29, 2015 at 02:48:30PM -0700, Christopher Larson wrote: > On Mon, Jun 29, 2015 at 12:10 PM, Ed Bartosh > wrote: > > > +global _BITBAKE_VARS > > + > > +if image not in _BITBAKE_VARS: > > > > In general, I’d suggest

[OE-core] [wic][PATCH v2 02/20] wic: Test rootfs plugin using image recipes

2015-06-30 Thread Ed Bartosh
Added canned wks and testcase to create multi-rootfs images referring bitbake image recipes. Signed-off-by: Ed Bartosh create mode 100644 scripts/lib/image/canned-wks/directdisk-multi-rootfs.wks diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py index 5385562..3cfc2ff

[OE-core] [wic][PATCH v2 04/20] wic: Refactor getting bitbake variables

2015-06-30 Thread Ed Bartosh
un only once and results are parsed only once per requested set of variables. get_bitbake_var became the only API call. It replaces find_artifacts, find_artifact, find_bitbake_env_lines, get_bitbake_env_lines, set_bitbake_env_lines and get_line_val calls making API much more clear. Signed-off-by: Ed

[OE-core] [wic][PATCH v2 05/20] wic: Include mount point into image report

2015-06-30 Thread Ed Bartosh
Wic doesn't show any information for the partition if label is not set. Fixed this by adding mount point to the report. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py index 2ea7e4e..58a9e9d 100644 --- a/scripts/lib/wic/imager/dire

[OE-core] [wic][PATCH v2 06/20] wic: Remove annoing debug message

2015-06-30 Thread Ed Bartosh
Wic tries to find plugins in every layer and prints a message 'Plugin dir is not a directory or does not exist' if layer doesn't have plugin dir. It causes a lot of duplicated messages in the debug output, which makes it hard to find useful info there. Signed-off-by: Ed Bartosh

[OE-core] [wic][PATCH v2 10/20] wic: Get rid of useless variable 'image_rootfs'

2015-06-30 Thread Ed Bartosh
Removed useless variable 'image_rootfs' from 4 prepare_rootfs_* methods. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py index 489ebe3..e3ae3ce 100644 --- a/scripts/lib/wic

[OE-core] [wic][PATCH v2 09/20] wic: Rename partition images

2015-06-30 Thread Ed Bartosh
Renamed partition images into .p This should make output directory look more organized and easier to understand. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py index e093ec5..d61087a 100644 --- a/scripts/lib/wic/utils

[OE-core] [wic][PATCH v2 00/20] miscellaneous fixes. poky-conrib:ed/wic/misc

2015-06-30 Thread Ed Bartosh
Christopher Larson to point that out to me - added one indentation fix Ed Bartosh (20): wic: Fix misleading message wic: Test rootfs plugin using image recipes wic: Test rootfs plugin using rootfs paths wic: Refactor getting bitbake variables wic: Include mount point into image report wic

[OE-core] [wic][PATCH v2 03/20] wic: Test rootfs plugin using rootfs paths

2015-06-30 Thread Ed Bartosh
Added testcase to create multi-rootfs images using rootfs plugin with paths to rootfs directories in wic command line. Signed-off-by: Ed Bartosh diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py index 3cfc2ff..0c503ef 100644 --- a/meta/lib/oeqa/selftest/wic.py +++ b

[OE-core] [wic][PATCH v2 08/20] wic: Refactor prepare_rootfs API

2015-06-30 Thread Ed Bartosh
Moved code out of prepare_roots* methods to avoid code duplication. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py index 324ea69..489ebe3 100644 --- a/scripts/lib/wic/kickstart

[OE-core] [wic][PATCH v2 07/20] wic: Turn off debug output for 'bitbake -e'

2015-06-30 Thread Ed Bartosh
Switched debug level to 'normal' to prevent huge 'bitbake -e' output to go into wic debug output. This should help to make wic debug info much more clean and easier to read. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/wic/utils/oe/misc.py b/scripts/lib/wic/utils/oe/m

[OE-core] [wic][PATCH v2 01/20] wic: Fix misleading message

2015-06-30 Thread Ed Bartosh
Due to usage of incorrect variable wic produces strange message "No image named None found, exiting." when specified canned .wks doesn't exist. Fixed by replacing wks_file -> argv[0] Signed-off-by: Ed Bartosh diff --git a/scripts/wic b/scripts/wic index f9be972..a39ec95 10

[OE-core] [wic][PATCH v2 19/20] wic: Code cleanup: long lines, identation and whitespaces

2015-06-30 Thread Ed Bartosh
Fixed pylint warnings bad-continuation, bad-continuation and line-too-long. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py index 92dcc5a..0dc7920 100644 --- a/scripts/lib/image/engine.py +++ b/scripts/lib/image/engine.py @@ -236,7 +236,10 @@ def

[OE-core] [wic][PATCH v2 20/20] wic: Code cleanup: unused imports

2015-06-30 Thread Ed Bartosh
Fixed pylint warning unused-import Signed-off-by: Ed Bartosh diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py index 0dc7920..73e8f8b 100644 --- a/scripts/lib/image/engine.py +++ b/scripts/lib/image/engine.py @@ -30,18 +30,10 @@ import os import sys -from abc import

[OE-core] [wic][PATCH v2 13/20] wic: Remove duplicated code

2015-06-30 Thread Ed Bartosh
Moved duplicated code of geting rootfs size out of prepare_rootfs* methods. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py index 4e8a6a8..72f617a 100644 --- a/scripts/lib/wic/kickstart

[OE-core] [wic][PATCH v2 15/20] wic: Add --uuid partition option

2015-06-30 Thread Ed Bartosh
Added --uuid option to the configuration of wks parser. This option specifies partition UUID. The code to process it is already in place. It was implemented for --use-uuid option. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py index c8b2fab..0666d80

[OE-core] [wic][PATCH v2 18/20] wic: Fix confusing error message

2015-06-30 Thread Ed Bartosh
issed artifacts. Now the message looks like this: The following build artifacts are not specified: bootimg-dir, kernel-dir, native-sysroot [YOCTO #7912] Signed-off-by: Ed Bartosh diff --git a/scripts/wic b/scripts/wic index b75d122..ac272c6 100755 --- a/scripts/wic +++ b/scripts/wic @@ -1

[OE-core] [wic][PATCH v2 16/20] wic: Refactor fstab update code

2015-06-30 Thread Ed Bartosh
Made the code to backup and restore fstab only if it's modified. Cleaned up the code. Made it more pythonic. Improved code readability by moving code from several tiny methods into one place. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/i

[OE-core] [wic][PATCH v2 12/20] wic: Refactor prepare_empty_partition API

2015-06-30 Thread Ed Bartosh
Moved code out of prepare_empty_partition* methods to avoid code duplication. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py index 0741bb2..4e8a6a8 100644 --- a/scripts/lib/wic/kickstart

[OE-core] [wic][PATCH v2 11/20] wic: Call methods better way

2015-06-30 Thread Ed Bartosh
Shortened code by using getattr to obtain a method to call for prepare_empty_partition_* and prepare_rootfs_* methods. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py index e3ae3ce..0741bb2

[OE-core] [wic][PATCH v2 14/20] wic: Fix naming conflict

2015-06-30 Thread Ed Bartosh
Image file name is not unique for the partitions without label. This causes image being rewritten and used as a source for all partitions without label. Wic produces broken or incorrect result images because of that. Added wks line number to the image name to make it unique. Signed-off-by: Ed

[OE-core] [wic][PATCH v2 17/20] wic: Remove __write_partition method

2015-06-30 Thread Ed Bartosh
Moved code of __write_partition to 'assemble' method. This way it should be more readable. Signed-off-by: Ed Bartosh diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py index d61087a..ca4b1f0 100644 --- a/scripts/lib/wic/utils/partitionedf

[OE-core] [wic][PATCH] wic: Set default set of bitbake variables

2015-07-10 Thread Ed Bartosh
Set default set of bitbake variables to the set of variables for the first parsed image. This allows wic to find proper bitbake varibale values if it's called with '-e ' even without specifying image in the call of get_bitbake_var. Signed-off-by: Ed Bartosh --- scripts/lib/wic/u

[OE-core] [PATCH] toaster.bbclass: Fix ValueError

2015-07-27 Thread Ed Bartosh
=) ValueError: too many values to unpack Fixed by changing delimiter ':' -> '::' Signed-off-by: Ed Bartosh --- meta/classes/toaster.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass i

Re: [OE-core] wic: Add plugin for hybrid iso image

2015-07-28 Thread Ed Bartosh
Hi Mihaly, The code looks ok to me. Can you please fix the following: 1. Pylint is reporting a lot of long lines, indentation and other issues, so it would be nice if you run it and fix at least some of them? 2. Docstring of plugin class is shown in 'wic help plugins' output. Some lines of your

[OE-core] [PATCH] create-pull-request: Implement -d option

2015-07-30 Thread Ed Bartosh
Signed-off-by: Ed Bartosh --- scripts/create-pull-request | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/create-pull-request b/scripts/create-pull-request index 97ed874..216edfd 100755 --- a/scripts/create-pull-request +++ b/scripts/create-pull-request

[OE-core] [PATCH] bmap-tools: v3.2 (initial commit)

2015-08-03 Thread Ed Bartosh
flashed a lot faster with bmaptool than with traditional tools like "dd" or "cp". This package provides Python API, which can be used to generate bmaps for Yocto images produced by bitbake and wic. Signed-off-by: Ed Bartosh --- meta/recipes-extended/bmap-tools/bm

[OE-core] [PATCH 2/6] wic: Improve 'wic help overview' content

2015-08-03 Thread Ed Bartosh
Included full console output and example of the .wks file into the 'wic help overview' content. Used qemux86-64 machine instead of crownbay to make example working without cloning additional layers. [YOCTO #7940] Signed-off-by: Ed Bartosh --- scripts/lib/image/he

[OE-core] [PATCH 5/6] wic: code cleanup: pylint misc.py

2015-08-03 Thread Ed Bartosh
Fixed pylint warnings. Increased pylint score from 8.02 to 9.40. Signed-off-by: Ed Bartosh --- scripts/lib/wic/utils/oe/misc.py | 40 +--- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/scripts/lib/wic/utils/oe/misc.py b/scripts/lib/wic/utils

[OE-core] [PATCH 0/6] wic: finalize 0.2.0

2015-08-03 Thread Ed Bartosh
+0100) are available in the git repository at: git://git.yoctoproject.org/poky-contrib ed/wic/0.2.0 http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wic/0.2.0 Ed Bartosh (6): wic: improved usage text wic: Improve 'wic help overview' content wic: Report recipe name

[OE-core] [PATCH 3/6] wic: Report recipe name for native commands

2015-08-03 Thread Ed Bartosh
exec_native_cmd was modified to report recipe to build native programs. Pairs executable->recipe are hardcoded as it's not possible to obtain this information automatically. [YOCTO #7631] Signed-off-by: Ed Bartosh --- scripts/lib/wic/utils/oe/misc.py | 29 ++---

[OE-core] [PATCH 4/6] wic: code cleanup: remove unused code

2015-08-03 Thread Ed Bartosh
Removed unused global variable wks_vars and 2 unused functions get_wks_var and add_wks_var. Signed-off-by: Ed Bartosh --- scripts/lib/wic/utils/oe/misc.py | 11 --- 1 file changed, 11 deletions(-) diff --git a/scripts/lib/wic/utils/oe/misc.py b/scripts/lib/wic/utils/oe/misc.py index

[OE-core] [PATCH 6/6] wic: release 0.2.0

2015-08-03 Thread Ed Bartosh
documentation fixes - code clenup Signed-off-by: Ed Bartosh --- scripts/wic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/wic b/scripts/wic index 9435ce0..c1d3003 100755 --- a/scripts/wic +++ b/scripts/wic @@ -29,7 +29,7 @@ # Tom Zanussi # -__version__ = "

[OE-core] [PATCH 1/6] wic: improved usage text

2015-08-03 Thread Ed Bartosh
Made command line specification less confusing. Reformatted usage output. [YOCTO #7938] Signed-off-by: Ed Bartosh --- scripts/lib/image/help.py | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py index 0666d80

[OE-core] [PATCH] create-pull-request: cd to relative directory

2015-08-05 Thread Ed Bartosh
g directory and running git format-patch in it with --relative, without specifying relative path as a parameter. Signed-off-by: Ed Bartosh --- scripts/create-pull-request | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/create-pull-request b/scripts/create-pull-reques

[OE-core] [PATCH v2] create-pull-request: cd to relative directory

2015-08-05 Thread Ed Bartosh
g directory and running git format-patch in it with --relative, without specifying relative path as a parameter. Signed-off-by: Ed Bartosh --- scripts/create-pull-request | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/create-pull-request b/scripts/create-pull-reques

Re: [OE-core] [PATCH] create-pull-request: cd to relative directory

2015-08-06 Thread Ed Bartosh
On Thu, Aug 06, 2015 at 09:38:16AM +0100, Paul Eggleton wrote: > On Wednesday 05 August 2015 20:33:48 Khem Raj wrote: > > On Wed, Aug 5, 2015 at 2:01 AM, Ed Bartosh > wrote: > > > create-pull-request -d path creates empty patches if directory > > > is specifie

Re: [OE-core] wic: Add plugin for hybrid iso image

2015-08-11 Thread Ed Bartosh
Hi Mihaly, Great work! Thank you! Acked-by: Ed Bartosh On Thu, Aug 06, 2015 at 08:04:49PM +0300, Mihaly Varga wrote: > > Hi Ed, > > Thank you for your comments. There is a slightly modified version of > the isoimage-isohybrid plugin, the kickstart file and the wic selftest

[OE-core] [PATCH v2] create-pull-request: cd to relative directory

2015-08-11 Thread Ed Bartosh
g directory and running git format-patch in it with --relative, without specifying relative path as a parameter. Signed-off-by: Ed Bartosh --- scripts/create-pull-request | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/create-pull-request b/scripts/create-pull-reques

[OE-core] [PATCH v3] create-pull-request: cd to relative directory

2015-08-11 Thread Ed Bartosh
g directory and running git format-patch in it with --relative, without specifying relative path as a parameter. Signed-off-by: Ed Bartosh --- scripts/create-pull-request | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/create-pull-request b/scripts/create-pull-reques

[OE-core] [PATCH v4] create-pull-request: cleanup bashisms

2015-08-12 Thread Ed Bartosh
Made create-pull-request POSIX compatible: - Replaced /bin/bash -> /bin/sh in shebang. - Replaced usage of pushd/popd with generic shell commands. - Tested on zsh and dash. Signed-off-by: Ed Bartosh --- scripts/create-pull-request | 7 --- 1 file changed, 4 insertions(+)

[OE-core] [PATCH 00/17] Build wic images with bitbake

2015-08-20 Thread Ed Bartosh
05:56 +0100) are available in the git repository at: git://git.yoctoproject.org/poky-contrib ed/wic/wic-image-type http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wic/wic-image-type Ed Bartosh (17): image.py: write bitbake variables to .env file oe-selftest: test generation o

[OE-core] [PATCH 07/17] wic: set default image

2015-08-20 Thread Ed Bartosh
Set BitbakeVars.default_image when wic is called with -e option. This makes get_bitbake_var API to use provided image as a default source of variables. Signed-off-by: Ed Bartosh --- scripts/wic | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/wic b/scripts/wic

[OE-core] [PATCH 05/17] wic: create new method _parse_line

2015-08-20 Thread Ed Bartosh
Moved code that parses one line of 'bitbake -e' output to separate method _parse_line. This method will be also used later to parse lines of .env files. Signed-off-by: Ed Bartosh --- scripts/lib/wic/utils/oe/misc.py | 27 +-- 1 file changed, 17 inserti

[OE-core] [PATCH 09/17] wic: implement --vars option

2015-08-20 Thread Ed Bartosh
e runs wic to produce wic images. In this case wic can't run bitbake again as it's locked, so it will get variables from .env files. Signed-off-by: Ed Bartosh --- scripts/wic | 6 ++ 1 file changed, 6 insertions(+) diff --git a/scripts/wic b/scripts/wic index 87ada36..815b84e 1007

[OE-core] [PATCH 06/17] wic: add default_image attribute to BitbakeVars

2015-08-20 Thread Ed Bartosh
New attribute is used when bitbake variable is requested without specifying image name. The attribute should be set from outside, for example when wic is called with '-e ' option. Signed-off-by: Ed Bartosh --- scripts/lib/wic/utils/oe/misc.py | 6 ++ 1 file changed, 6 insertion

[OE-core] [PATCH 04/17] wic: add BitbakeVars class

2015-08-20 Thread Ed Bartosh
Moved code of getting bitbake variables into separate class. Created singleton object of this class in the module namespace. Preserved existing API get_bitbake_var. Signed-off-by: Ed Bartosh --- scripts/lib/wic/utils/oe/misc.py | 91 +++- 1 file changed, 53

[OE-core] [PATCH 10/17] wic: rename variable

2015-08-20 Thread Ed Bartosh
Renamed variable help -> hlp as 'help' is a name of Python built-in function. Signed-off-by: Ed Bartosh --- scripts/lib/image/help.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py index 5fa5836..dc6ff36

[OE-core] [PATCH 11/17] wic: deferred call of hlp.get_wic_plugins_help()

2015-08-20 Thread Ed Bartosh
tialized to get variables from .env files. Signed-off-by: Ed Bartosh --- scripts/lib/image/help.py | 2 ++ scripts/wic | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py index dc6ff36..717d847 100644 --- a/sc

[OE-core] [PATCH 08/17] wic: implement getting variables from .env files

2015-08-20 Thread Ed Bartosh
Added functionality of getting variables from .env files to BitbakeVars class. env files will be parsed if the directory with env files is known, i.e. when vars_dir attribute is set. Otherwise 'bitbake -e' output will be parsed. Signed-off-by: Ed Bartosh --- scripts/lib/wic/utils/

[OE-core] [PATCH 03/17] wic: remove undescore from function name

2015-08-20 Thread Ed Bartosh
Renamed __exec_cmd -> _exec_cmd as double underscores cause strange behaviour when function is called in class method. Python complains that __exec_cmd method(!!!) of the same class doesn't exist. Signed-off-by: Ed Bartosh --- scripts/lib/wic/utils/oe/misc.py | 12 ++-- 1 file

[OE-core] [PATCH 14/17] oe-selftest: test building wic image by bitbake

2015-08-20 Thread Ed Bartosh
Added test case to verify building of wic-image-minimal recipe and produced artifacts: manifest and bzipped partitioned image. Signed-off-by: Ed Bartosh --- meta/lib/oeqa/selftest/wic.py | 14 ++ 1 file changed, 14 insertions(+) diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib

[OE-core] [PATCH 12/17] image_types.bbclass: add wic image type

2015-08-20 Thread Ed Bartosh
wic image type is used to produce partitioned images. Image configuration should be stored in either ..wks or .wks file. .wks file should be put to the same location as image recipe and have the same name. [YOCTO #7672] Signed-off-by: Ed Bartosh --- meta/classes/image_types.bbclass | 12

[OE-core] [PATCH 15/17] image.py: set bitbake variable ROOTFS_SIZE

2015-08-20 Thread Ed Bartosh
This variable is going to be used by wic to set partition size. Setting it in image.py makes it possible for wic to use it without calculating it again. Signed-off-by: Ed Bartosh --- meta/lib/oe/image.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/lib/oe/image.py

[OE-core] [PATCH 17/17] image.py: add script output to the rootfs log

2015-08-20 Thread Ed Bartosh
Let's add output of image creation script to the bitbake log as it can contain useful information. One good example of such an information is wic report about artifacts and .wks file used for image creation. Signed-off-by: Ed Bartosh --- meta/lib/oe/image.py | 5 - 1 file chang

[OE-core] [PATCH 13/17] wic-image-minimal: add wic image recipe and .wks

2015-08-20 Thread Ed Bartosh
inimal/1.0-r0/rootfs BOOTIMG_DIR: tmp/sysroots/qemux86-64/usr/share KERNEL_DIR: tmp/deploy/images/qemux86-64 NATIVE_SYSROOT: tmp/sysroots/x86_64-linux Signed-off-by: Ed Bartosh --- meta/recipes-extended/images/wic-image-minimal.bb | 14 ++ meta/recipes-extended/images/wic-image-minimal.wk

[OE-core] [PATCH 01/17] image.py: write bitbake variables to .env file

2015-08-20 Thread Ed Bartosh
Write set of bitbake variables associated with the image into build/tmp/sysroots//imagedata/.env This is needed for wic to be able to get bitbake variables without running 'bitbake -e'. Signed-off-by: Ed Bartosh --- meta/lib/oe/image.py | 23 +++ 1 file c

[OE-core] [PATCH 16/17] wic: use bitbake variable ROOTFS_SIZE

2015-08-20 Thread Ed Bartosh
, IMAGE_ROOTFS_ALIGNMENT, IMAGE_OVERHEAD_FACTOR and IMAGE_ROOTFS_EXTRA_SPACE. Signed-off-by: Ed Bartosh --- scripts/lib/wic/imager/direct.py | 14 ++ 1 file changed, 14 insertions(+) diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py index 57b1335..d68fd2a 100644 --- a

[OE-core] [PATCH 02/17] oe-selftest: test generation of .env

2015-08-20 Thread Ed Bartosh
Added test case to check if .env file is generated and contains bitbake variables used in wic code. Signed-off-by: Ed Bartosh --- meta/lib/oeqa/selftest/wic.py | 20 1 file changed, 20 insertions(+) diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py

[OE-core] [PATCH 0/2] Implement build-image plugin for devtool

2015-08-24 Thread Ed Bartosh
(2015-08-20 22:04:43 +0100) are available in the git repository at: git://git.yoctoproject.org/poky-contrib ed/devtool/8135 http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/devtool/8135 Ed Bartosh (2): devtool: make add_md5 a public API devtool: implement build-image plugin

[OE-core] [PATCH 2/2] devtool: implement build-image plugin

2015-08-24 Thread Ed Bartosh
Implemented new plugin to build image from workspace packages. Plugin creates .bbappend file, adds all workspace packages to the image using IMAGE_INSTALL_append variable in bbappend file. After that it runs 'bitbake '. Signed-off-by: Ed Bartosh --- scripts/lib/devtool/build-ima

[OE-core] [PATCH 1/2] devtool: make add_md5 a public API

2015-08-24 Thread Ed Bartosh
Moved _add_md5 function from standard.py to __init__.py to be able to call it from other modules. Signed-off-by: Ed Bartosh --- scripts/lib/devtool/__init__.py | 6 ++ scripts/lib/devtool/standard.py | 14 -- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a

[OE-core] [PATCH 04/17] wic: add BitbakeVars class

2015-08-25 Thread Ed Bartosh
Moved code of getting bitbake variables into separate class. Created singleton object of this class in the module namespace. Preserved existing API get_bitbake_var. Signed-off-by: Ed Bartosh --- scripts/lib/wic/utils/oe/misc.py | 91 +++- 1 file changed, 53

[OE-core] [PATCH 08/17] wic: implement getting variables from .env files

2015-08-25 Thread Ed Bartosh
Added functionality of getting variables from .env files to BitbakeVars class. env files will be parsed if the directory with env files is known, i.e. when vars_dir attribute is set. Otherwise 'bitbake -e' output will be parsed. Signed-off-by: Ed Bartosh --- scripts/lib/wic/utils/

[OE-core] [PATCH 12/17] image_types.bbclass: add wic image type

2015-08-25 Thread Ed Bartosh
wic image type is used to produce partitioned images. Image configuration should be stored in either ..wks or .wks file. .wks file should be put to the same location as image recipe and have the same name. [YOCTO #7672] Signed-off-by: Ed Bartosh --- meta/classes/image_types.bbclass | 12

[OE-core] [PATCH 10/17] wic: rename variable

2015-08-25 Thread Ed Bartosh
Renamed variable help -> hlp as 'help' is a name of Python built-in function. Signed-off-by: Ed Bartosh --- scripts/lib/image/help.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py index 5fa5836..dc6ff36

[OE-core] [PATCH 14/17] oe-selftest: test building wic image by bitbake

2015-08-25 Thread Ed Bartosh
Added test case to verify building of wic-image-minimal recipe and produced artifacts: manifest and bzipped partitioned image. Signed-off-by: Ed Bartosh --- meta/lib/oeqa/selftest/wic.py | 14 ++ 1 file changed, 14 insertions(+) diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib

[OE-core] [PATCH 15/17] image.py: set bitbake variable ROOTFS_SIZE

2015-08-25 Thread Ed Bartosh
This variable is going to be used by wic to set partition size. Setting it in image.py makes it possible for wic to use it without calculating it again. Signed-off-by: Ed Bartosh --- meta/lib/oe/image.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/lib/oe/image.py

[OE-core] [PATCH v2 00/17] Build wic images with bitbake

2015-08-25 Thread Ed Bartosh
b62e0476ba9e12f9125ed9f785cf23: bitbake: lib/bb/main: avoid importing all server/UI modules on every execution (2015-08-24 23:47:07 +0100) are available in the git repository at: git://git.yoctoproject.org/poky-contrib ed/wic/wic-image-type http://git.yoctoproject.org/cgit.cgi/poky-contrib/lo

[OE-core] [PATCH 09/17] wic: implement --vars option

2015-08-25 Thread Ed Bartosh
e runs wic to produce wic images. In this case wic can't run bitbake again as it's locked, so it will get variables from .env files. Signed-off-by: Ed Bartosh --- scripts/wic | 6 ++ 1 file changed, 6 insertions(+) diff --git a/scripts/wic b/scripts/wic index 87ada36..815b84e 1007

[OE-core] [PATCH 06/17] wic: add default_image attribute to BitbakeVars

2015-08-25 Thread Ed Bartosh
New attribute is used when bitbake variable is requested without specifying image name. The attribute should be set from outside, for example when wic is called with '-e ' option. Signed-off-by: Ed Bartosh --- scripts/lib/wic/utils/oe/misc.py | 6 ++ 1 file changed, 6 insertion

[OE-core] [PATCH 02/17] oe-selftest: test generation of .env

2015-08-25 Thread Ed Bartosh
Added test case to check if .env file is generated and contains bitbake variables used in wic code. Signed-off-by: Ed Bartosh --- meta/lib/oeqa/selftest/wic.py | 19 +++ 1 file changed, 19 insertions(+) diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py

[OE-core] [PATCH 17/17] image.py: add script output to the rootfs log

2015-08-25 Thread Ed Bartosh
Let's add output of image creation script to the bitbake log as it can contain useful information. One good example of such an information is wic report about artifacts and .wks file used for image creation. Signed-off-by: Ed Bartosh --- meta/lib/oe/image.py | 5 - 1 file chang

[OE-core] [PATCH 01/17] image.py: write bitbake variables to .env file

2015-08-25 Thread Ed Bartosh
Write set of bitbake variables associated with the image into build/tmp/sysroots//imagedata/.env This is needed for wic to be able to get bitbake variables without running 'bitbake -e'. Signed-off-by: Ed Bartosh --- meta/lib/oe/image.py | 23 +++ 1 file c

[OE-core] [PATCH 16/17] wic: use bitbake variable ROOTFS_SIZE

2015-08-25 Thread Ed Bartosh
, IMAGE_ROOTFS_ALIGNMENT, IMAGE_OVERHEAD_FACTOR and IMAGE_ROOTFS_EXTRA_SPACE. Signed-off-by: Ed Bartosh --- scripts/lib/wic/imager/direct.py | 14 ++ 1 file changed, 14 insertions(+) diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py index 57b1335..d68fd2a 100644 --- a

[OE-core] [PATCH 07/17] wic: set default image

2015-08-25 Thread Ed Bartosh
Set BitbakeVars.default_image when wic is called with -e option. This makes get_bitbake_var API to use provided image as a default source of variables. Signed-off-by: Ed Bartosh --- scripts/wic | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/wic b/scripts/wic

[OE-core] [PATCH 03/17] wic: remove undescore from function name

2015-08-25 Thread Ed Bartosh
Renamed __exec_cmd -> _exec_cmd as double underscores cause strange behaviour when function is called in class method. Python complains that __exec_cmd method(!!!) of the same class doesn't exist. Signed-off-by: Ed Bartosh --- scripts/lib/wic/utils/oe/misc.py | 12 ++-- 1 file

[OE-core] [PATCH 11/17] wic: deferred call of hlp.get_wic_plugins_help()

2015-08-25 Thread Ed Bartosh
tialized to get variables from .env files. Signed-off-by: Ed Bartosh --- scripts/lib/image/help.py | 2 ++ scripts/wic | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py index dc6ff36..717d847 100644 --- a/sc

[OE-core] [PATCH 05/17] wic: create new method _parse_line

2015-08-25 Thread Ed Bartosh
Moved code that parses one line of 'bitbake -e' output to separate method _parse_line. This method will be also used later to parse lines of .env files. Signed-off-by: Ed Bartosh --- scripts/lib/wic/utils/oe/misc.py | 27 +-- 1 file changed, 17 inserti

[OE-core] [PATCH 13/17] wic-image-minimal: add wic image recipe and .wks

2015-08-25 Thread Ed Bartosh
inimal/1.0-r0/rootfs BOOTIMG_DIR: tmp/sysroots/qemux86-64/usr/share KERNEL_DIR: tmp/deploy/images/qemux86-64 NATIVE_SYSROOT: tmp/sysroots/x86_64-linux Signed-off-by: Ed Bartosh --- meta/recipes-extended/images/wic-image-minimal.bb | 14 ++ meta/recipes-extended/images/wic-image-minimal.wk

Re: [OE-core] [PATCH 12/17] image_types.bbclass: add wic image type

2015-08-26 Thread Ed Bartosh
oor > > -Original Message- > From: openembedded-core-boun...@lists.openembedded.org > [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of Ed > Bartosh > Sent: Tuesday, August 25, 2015 2:04 PM > To: openembedded-core@lists.openembedded.org > Subjec

Re: [OE-core] [PATCH 01/17] image.py: write bitbake variables to .env file

2015-08-30 Thread Ed Bartosh
On Sun, Aug 30, 2015 at 12:24:48PM +0100, Richard Purdie wrote: > On Thu, 2015-08-20 at 14:56 +0300, Ed Bartosh wrote: > > Write set of bitbake variables associated with the image into > > build/tmp/sysroots//imagedata/.env > > > > This is needed for wic to be ab

<    2   3   4   5   6   7   8   9   10   11   >