[OE-core] [wic][PATCH] wic: Consider PSEUDO_* environment variables

2015-03-16 Thread Ed Bartosh
Used default values of PSEUDO_* environment variables only if variables are not set. This allows to set custom PSEUDO_PREFIX and other pseudo variables in order to use pseudo database from non-standard locations. Change-Id: I0bc1af5e521121d1f96d590cb6edb23cf0cb0b83 Signed-off-by: Ed Bartosh

[OE-core] [bitbake][PATCH] bitbake: bin/bitbake: Create bitbake_main API

2015-03-16 Thread Ed Bartosh
Moved most of functionality of bin/bitbake to lib/bb/main.py to be able to call bitbake from python code. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- bitbake/bin/bitbake| 362 + bitbake/lib/bb/main.py | 391

[OE-core] [PATCH] lib/oe/lsb.py: Stop parsing /etc/SuSE-release

2015-03-20 Thread Ed Bartosh
already parses it. Current implementation of release_dict_file returns different values when parsing /etc/SuSE-release and /etc/os-release. This is one more advantage of getting rid of parsing /etc/SuSE-release. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- meta/lib/oe/lsb.py | 8

Re: [OE-core] [PATCH] lib/oe/lsb.py: Stop parsing /etc/SuSE-release

2015-03-20 Thread Ed Bartosh
On Fri, Mar 20, 2015 at 11:38:25AM +, Paul Eggleton wrote: Hi Ed, On Friday 20 March 2015 13:22:50 Ed Bartosh wrote: /etc/SuSE-release should not be parsed to obtain release info Here is the quote from /etc/SuSE-release: /etc/SuSE-release is deprecated and will be removed

[OE-core] [PATCH] lib/oe/lsb.py: Prioritize parsing of /etc/os-release

2015-03-20 Thread Ed Bartosh
Moved parsing of /etc/os-release before parsing of /etc/SuSE-release as /etc/SuSE-release is deprecated in recent releases of OpenSuSE. Here is the quote from /etc/SuSE-release: /etc/SuSE-release is deprecated and will be removed in the future, use /etc/os-release instead Signed-off-by: Ed

[OE-core] [PATCH] linux-yocto-tiny: Enable CONFIG_BINFMT_SCRIPT

2015-03-20 Thread Ed Bartosh
This SRCREV update fixes the failure of running /init for poky-tiny image. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb | 2 +- meta/recipes-kernel/linux/linux-yocto-tiny_3.19.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions

[OE-core] [PATCH] kernel.bbclass: Fix race condition

2015-03-12 Thread Ed Bartosh
mk_shared_workdir and called from do_kernel_compile. do_shared_workdir left in the code as it may be used in many recipes. [YOCTO #7321] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- meta/classes/kernel.bbclass | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/meta

[OE-core] [PATCH] rootfs.py: Remove rpm database from staging area

2015-03-30 Thread Ed Bartosh
. [YOCTO #6571] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- meta/lib/oe/rootfs.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index 4e4e6eb..9f7dc65 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py @@ -306,6 +306,9

[OE-core] [PATCH] package_manager: Run createrepo sequentially

2015-03-30 Thread Ed Bartosh
will not be accessed by multiple createrepo at the same time. [YOCTO #6571] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- meta/lib/oe/package_manager.py | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py

Re: [OE-core] [PATCH] package_manager: Run createrepo sequentially

2015-03-30 Thread Ed Bartosh
On Mon, Mar 30, 2015 at 10:11:13AM +0100, Richard Purdie wrote: On Mon, 2015-03-30 at 12:00 +0300, Ed Bartosh wrote: Running multiple createrepo in parallel can cause raice conditions when creating/accessing rpm database. Createrepo fails with the error package_manager: rpmdb: BDB0060 PANIC

Re: [OE-core] [PATCH] rootfs.py: Remove rpm database from staging area

2015-03-30 Thread Ed Bartosh
On Mon, Mar 30, 2015 at 10:14:36AM -0500, Mark Hatle wrote: On 3/30/15 3:53 AM, Richard Purdie wrote: On Mon, 2015-03-30 at 11:30 +0300, Ed Bartosh wrote: Rpm database in staging area is used only by createrepo. createrepo fails with the error rpmdb: BDB0060 PANIC: fatal region error

Re: [OE-core] [PATCH] rootfs.py: Remove rpm database from staging area

2015-03-30 Thread Ed Bartosh
On Mon, Mar 30, 2015 at 10:14:36AM -0500, Mark Hatle wrote: On 3/30/15 3:53 AM, Richard Purdie wrote: On Mon, 2015-03-30 at 11:30 +0300, Ed Bartosh wrote: Rpm database in staging area is used only by createrepo. createrepo fails with the error rpmdb: BDB0060 PANIC: fatal region error

[OE-core] [PATCH] package_manager: call createrepo with --dbpath pointing inside WORKDIR

2015-03-30 Thread Ed Bartosh
potentially fix the failure. [YOCTO #6571] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- meta/lib/oe/package_manager.py | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index 743c7cb..2461acd 100644

[OE-core] [PATCH] createrepo: Implement --dbpath command line option

2015-03-30 Thread Ed Bartosh
--dbpath option allows to specify path to the directory with rpm database. By default createrepo uses or creates rpm database in /var/lib/rpm/. Upstream-Status: Pending Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- .../createrepo/createrepo/createrepo-dbpath.patch | 51

[OE-core] [PATCH] createrepo: Implement --dbpath command line option

2015-04-01 Thread Ed Bartosh
createrepo in parallel, it can help to avoid race conditions caused by accessing or creating the same rpm database by multiple createrepo instances at the same time. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- .../createrepo/createrepo/createrepo-dbpath.patch | 61

[OE-core] [PATCH] createrepo: Implement --dbpath command line option

2015-04-01 Thread Ed Bartosh
createrepo in parallel, it can help to avoid race conditions caused by accessing or creating the same rpm database by multiple createrepo instances at the same time. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- .../createrepo/createrepo/createrepo-dbpath.patch | 51

Re: [OE-core] [PATCH] createrepo: Implement --dbpath command line option

2015-04-01 Thread Ed Bartosh
On Wed, Apr 01, 2015 at 03:06:52PM +0300, Ed Bartosh wrote: --dbpath option can be used in cases where users don't want createrepo to use system rpm db to avoid possible collisiouns with other programs. For bitbake builds it would be possible to specify different databases even for every

[OE-core] [PATCH] package_manager: call createrepo with --dbpath pointing inside WORKDIR

2015-04-01 Thread Ed Bartosh
. This should potentially fix the failure as every run of createrepo will be using separate db. [YOCTO #6571] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- meta/lib/oe/package_manager.py | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meta/lib/oe

Re: [OE-core] [PATCH] createrepo: Implement --dbpath command line option

2015-04-01 Thread Ed Bartosh
On Tue, Mar 31, 2015 at 10:25:11PM +0100, Burton, Ross wrote: Hi Ed, On 31 March 2015 at 00:49, Ed Bartosh ed.bart...@linux.intel.com wrote: Upstream-Status: Pending The commit log needs just a Signed-off-by; the patch needs an explanation, Signed-off-by, and Upstream-Status

[OE-core] [wic][PATCH] wic tests: Add functional tests for directdisk

2015-04-23 Thread Ed Bartosh
Added 2 simple functional test cases to check if wic is able to produce images using directdisk.wks Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/setup.cfg | 2 +- scripts/tests/02_wic_test_directdisk.py | 61 + 2 files

[OE-core] [wic][PATCH] wic tests: Add docstrings to test methods

2015-04-23 Thread Ed Bartosh
Docstrings make nosetests output more clear: Test wic create --help ... ok Test wic --help ... ok Test wic list --help ... ok Test wic create directdisk providing all artifacts. ... ok Test wic create directdisk --image-name core-image-minimal ... ok Signed-off-by: Ed Bartosh ed.bart

Re: [OE-core] [master-next][PATCH] wic: Add plugin for single partition disk

2015-04-21 Thread Ed Bartosh
On Mon, Apr 20, 2015 at 10:27:26PM +0200, Adrian Freihofer wrote: Hi Ed, Thank you for the response. See my comments below. On Mon, 2015-04-20 at 21:21 +0300, Ed Bartosh wrote: Hi Adrian, Thank you for the plugin! The implementation looks good to me. See my comments below

Re: [OE-core] [wic][PATCH] wic: Implement --build-rootfs command line option

2015-04-21 Thread Ed Bartosh
On Mon, Apr 20, 2015 at 06:13:20PM +0200, Adrian Freihofer wrote: Let wic call bitbake seems to be a great idea. One question is open to me. What's the recommended approach to resolve the dependencies between the image, the bootloader and native tools which are additionally required to

Re: [OE-core] [master-next][PATCHv2] wic: Add plugin for single partition disk

2015-04-22 Thread Ed Bartosh
On Tue, Apr 21, 2015 at 11:48:04PM +0200, Adrian Freihofer wrote: So far I did not recognize the MACHINE dependent behavior you mentioned in your email. Thanks for the hint. May be wic has already a complexity demanding for unit tests... Be my guest :)

[OE-core] [PATCH] split_and_strip_files: regroup hardlinks to make build deterministic

2015-04-22 Thread Ed Bartosh
Reverted 7c0fd561bad0250a00cef63e3d787573112a59cf Created separate group of hardlinks for the files inside the same package. This should prevent stripped files to be populated outside of package directories. [YOCTO #7586] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- meta/classes

Re: [OE-core] [master-next][PATCHv2] wic: Add plugin for single partition disk

2015-04-22 Thread Ed Bartosh
On Tue, Apr 21, 2015 at 11:08:32PM +0200, Adrian Freihofer wrote: The wic plugin creates a disk image containig one ext2/3/4 partition. No additional boot partition is required. Syslinux is installed into the image. The target device is a legacy BIOS PC. Purpose of this plugin: Other

Re: [OE-core] [master-next][PATCH] wic: Add plugin for single partition disk

2015-04-20 Thread Ed Bartosh
Hi Adrian, Thank you for the plugin! The implementation looks good to me. See my comments below. On Mon, Apr 20, 2015 at 04:54:23PM +0200, Adrian Freihofer wrote: The wic plugin creates a disk image containig one ext2/3/4 partition. No additional boot partition is required. Syslinux is

Re: [OE-core] Fwd: Re: [wic][PATCH] wic: try to find bitbake using find_executable API

2015-04-20 Thread Ed Bartosh
On Mon, Apr 20, 2015 at 08:31:05AM -0400, Philip Balister wrote: I forgot to cc the list. Unfortunately, this led to the commit going in with the reference to oe-classic. Please people, get your terminology correct. The word soup in the wold is insane. My bad. I've received your e-mail,

[OE-core] [PATCH] split_and_strip_files: regroup hardlinks to make build deterministic

2015-04-22 Thread Ed Bartosh
Reverted 7c0fd561bad0250a00cef63e3d787573112a59cf Created separate group of hardlinks for the files inside the same package. This should prevent stripped files to be populated outside of package directories. [YOCTO #7586] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- meta/classes

[OE-core] [PATCH] split_and_strip_files: regroup hardlinks to make build deterministic

2015-04-28 Thread Ed Bartosh
Reverted 7c0fd561bad0250a00cef63e3d787573112a59cf Created separate group of hardlinks for the files inside the same package. This should prevent stripped files to be populated outside of package directories. [YOCTO #7586] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- meta/classes

[OE-core] [PATCH] split_and_strip_files: regroup hardlinks to make build deterministic

2015-04-28 Thread Ed Bartosh
Reverted 7c0fd561bad0250a00cef63e3d787573112a59cf Created separate group of hardlinks for the files inside the same package. This should prevent stripped files to be populated outside of package directories. [YOCTO #7586] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- meta/classes

[OE-core] [PATCH] oeqa/utils: Allow ~ in bblayers

2015-04-30 Thread Ed Bartosh
Bitbake can parse ~ in bblayer's paths. Added this functionality to oeqa code. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- meta/lib/oeqa/utils/commands.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index

[OE-core] [wic][PATCH] wic tests: Move wic tests to oe-selftest infra

2015-04-30 Thread Ed Bartosh
-- Ran 5 tests in 6.434s OK Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- meta/lib/oeqa/selftest/wic.py | 69 + scripts/setup.cfg | 6 --- scripts/tests/01_wic_test_help.py | 44 - scripts/tests

Re: [OE-core] [PATCH] oeqa/utils: Allow ~ in bblayers

2015-04-30 Thread Ed Bartosh
On Thu, Apr 30, 2015 at 01:08:09PM +, Mario Domenech Goulart wrote: Hi Ed, On Thu, 30 Apr 2015 14:04:50 +0300 Ed Bartosh ed.bart...@linux.intel.com wrote: Bitbake can parse ~ in bblayer's paths. Added this functionality to oeqa code. Signed-off-by: Ed Bartosh ed.bart

[OE-core] [PATCH] kernel.bbclass: Fix race condition

2015-05-04 Thread Ed Bartosh
mk_shared_workdir and called from do_kernel_compile. do_shared_workdir left in the code as it may be used in many recipes. [YOCTO #7321] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com Signed-off-by: Bruce Ashfield bruce.ashfi...@windriver.com --- meta/classes/kernel.bbclass | 12 +++- 1 file

Re: [OE-core] [master-next][PATCHv3] wic: Add plugin for single partition disk

2015-04-28 Thread Ed Bartosh
(syslinux console flowcontrol configuration. {} is ignored. + .format(param_match.group(5))) +break + +return syslinux_conf Acked-by: Ed Bartosh ed.bart...@linux.intel.com -- Regards, Ed -- ___ Openembedded

[OE-core] [PATCH] bitbake: toastergui: show relative paths in configvars view

2015-05-05 Thread Ed Bartosh
Stripped topdir from paths to config files in configvars view. [YOCTO #7463] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- bitbake/lib/toaster/toastergui/templates/configvars.html | 4 ++-- bitbake/lib/toaster/toastergui/templatetags/projecttags.py | 6 ++ bitbake/lib/toaster

[OE-core] [PATCH] kernel.bbclass: Fix race condition

2015-05-06 Thread Ed Bartosh
mk_shared_workdir and called from do_compile_kernelmodules. do_shared_workdir is left in the code as it may be used in many recipes. [YOCTO #7321] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com Signed-off-by: Bruce Ashfield bruce.ashfi...@windriver.com --- meta/classes/kernel.bbclass | 12

Re: [OE-core] [PATCH] bitbake: toastergui: show relative paths in configvars view

2015-05-05 Thread Ed Bartosh
On Tue, May 05, 2015 at 03:57:13PM +0300, Ed Bartosh wrote: Sorry, wrong list. Please ignore. Stripped topdir from paths to config files in configvars view. [YOCTO #7463] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- bitbake/lib/toaster/toastergui/templates/configvars.html

[OE-core] [PATCH v.4] kernel.bbclass: Fix race condition

2015-05-06 Thread Ed Bartosh
. [YOCTO #7321] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- meta/classes/kernel.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 125ed88..9207ae4 100644 --- a/meta/classes/kernel.bbclass +++ b/meta

[OE-core] [PATCH v.5] kernel.bbclass: Fix race condition

2015-05-06 Thread Ed Bartosh
do_compile_kernelmodules. [YOCTO #7321] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- meta/classes/kernel.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 125ed88..74092e9 100644 --- a/meta/classes

Re: [OE-core] [PATCH v2] wic: remove intermediate partitions

2015-05-15 Thread Ed Bartosh
Hi Alexandre, Thank you for the patch! Sorry for delayed review. I was on vacation. Acked-by: Ed Bartosh ed.bart...@linux.intel.com On Fri, May 08, 2015 at 09:17:14PM +0200, Alexandre Belloni wrote: Remove intermediate partitions that may have been created by a previous wic invocation. Those

[OE-core] [PATCH] kernel.bbclass: Fix race condition

2015-04-14 Thread Ed Bartosh
mk_shared_workdir and called from do_kernel_compile. do_shared_workdir left in the code as it may be used in many recipes. [YOCTO #7321] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com Signed-off-by: Bruce Ashfield bruce.ashfi...@windriver.com --- meta/classes/kernel.bbclass | 12 +++- 1 file

[OE-core] [wic][PATCH] wic: code cleanup: undefined variables

2015-04-15 Thread Ed Bartosh
Fixed forgoten imports Wic_PartData and ImageError. Removed unused and undefined variable syslinux_conf. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/lib/wic/kickstart/custom_commands/__init__.py | 1 + scripts/lib/wic/plugins/source/bootimg-efi.py | 3 +-- scripts

[OE-core] [wic][PATCH] wic: code cleanup: wildcard imports

2015-04-15 Thread Ed Bartosh
Here is what PEP8(Style Guide for Python Code) says about this: Wildcard imports (from module import *) should be avoided, as they make it unclear which names are present in the namespace, confusing both readers and many automated tools. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com

[OE-core] [wic][PATCH] wic: try to find bitbake using find_executable API

2015-04-17 Thread Ed Bartosh
From: Ed Bartosh eduard.bart...@intel.com Current wic code was assuming that bitbake directory is on the same level as scripts, which is not the case for oe classic. Using find_executable bitbake location should be determined better as this API uss $PATH to search for executables. Fixes [YOCTO

[OE-core] [wic][PATCH] wic: Use __file__ instead of sys.argv[0]

2015-04-09 Thread Ed Bartosh
Using __file__ makes the code work independently of the way it's loaded. In some cases wic can be imported by another program without executing it. sys.argv[0] would not contain path to the wic in such a cases. This is an enabler for unit testing with nose framework. Signed-off-by: Ed Bartosh

[OE-core] [wic][PATCH] wic:code cleanup: No space allowed

2015-04-09 Thread Ed Bartosh
Fixed pylint warning 'No space allowed around keyword argument assignment' Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/lib/wic/imager/baseimager.py | 8 ++--- scripts/lib/wic/imager/direct.py | 10 +++--- scripts/lib/wic/kickstart/__init__.py | 14

Re: [OE-core] [wic][PATCH] wic: Implement --build-rootfs command line option

2015-04-09 Thread Ed Bartosh
On Wed, Apr 08, 2015 at 07:18:40PM -0300, João Henrique Ferreira de Freitas wrote: Hi Ed, I liked. Two points: - How about if user sets INHERIT = rm_work? I mean the image recipe will be rm, right? I always put my images in RM_WORK_EXCLUDE so wic can use it. rm_work removes

[OE-core] [wic][PATCH] wic: Add argv argument to main

2015-04-09 Thread Ed Bartosh
Make it possible to call wic as an API from tests passing command line parameters as arguments to main. This is yet another enabler for wic unit testing. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/wic | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[OE-core] [wic][PATCH] wic: don't use host paths when looking for native tools

2015-04-07 Thread Ed Bartosh
exec_native_cmd should not use host paths in $PATH to avoid finding and using host tools. [YOCTO: #6204] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/lib/wic/utils/oe/misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/wic/utils/oe/misc.py

[OE-core] [wic][PATCH] wic: make error message more informative

2015-04-07 Thread Ed Bartosh
Included name of the missing program into the error message produced by exec_native_cmd when program is not found. Removed mentioning of the host programs as this API is not running them anymore. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/lib/wic/utils/oe/misc.py | 4

[OE-core] [wic][PATCH] wic: Implement --build-rootfs command line option

2015-04-07 Thread Ed Bartosh
-f/--build-rootfs option makes wic to run bitbake image to produce rootfs. This option requires image name to be specified with -e/--image-name. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/lib/image/help.py | 10 ++ scripts/wic | 25

Re: [OE-core] [wic][PATCH 2/2] wic: support ontrackdm6aux3 partitions

2015-04-07 Thread Ed Bartosh
parted_fs_type = ext2 Acked-by: Ed Bartosh ed.bart...@linux.intel.com -- Regards, Ed -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core

Re: [OE-core] [wic][PATCH 1/2] wic: rawcopy: ensure comparison is done on int

2015-04-07 Thread Ed Bartosh
RawCopyPlugin(SourcePlugin): out = exec_cmd(du_cmd) filesize = out.split()[0] -if filesize part.size: +if int(filesize) int(part.size): part.size = filesize part.source_file = dst Acked-by: Ed Bartosh ed.bart...@linux.intel.com

[OE-core] [wic][PATCH] wic: code cleanup: bad indentation

2015-04-07 Thread Ed Bartosh
Fixed pylint warning 'Bad indentation' Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/wic | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/wic b/scripts/wic index feff302..524156d 100755 --- a/scripts/wic +++ b/scripts/wic @@ -69,8 +69,8

Re: [OE-core] [wic][PATCH] wic: extended list of paths in find_binary_path

2015-04-07 Thread Ed Bartosh
On Mon, Apr 06, 2015 at 11:28:24AM -0300, Otavio Salvador wrote: If we want to have it as a 'standalone' tool we will need to somehow package the tool set for it to use, otherwise we have a maintenance nightmare (does patch X has been applied to Parted?). Can you elaborate a bit on how

[OE-core] [wic][PATCH] wic: code cleanup: unused imports

2015-04-07 Thread Ed Bartosh
Fixed pylint warning 'Unused import' Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/lib/wic/conf.py| 3 +-- scripts/lib/wic/creator.py | 2 +- scripts/lib/wic/imager/baseimager.py | 2 +- scripts/lib

Re: [OE-core] [wic][PATCH] wic: extended list of paths in find_binary_path

2015-04-06 Thread Ed Bartosh
On Mon, Apr 06, 2015 at 09:00:50AM -0300, Otavio Salvador wrote: On Sun, Apr 5, 2015 at 4:16 PM, Philip Balister phi...@balister.org wrote: On 04/04/2015 10:20 AM, Ed Bartosh wrote: wic requires tools that are not always possible to find in $PATH. This causes wic to fail with confusing

[OE-core] [wic][PATCH] wic: extended list of paths in find_binary_path

2015-04-04 Thread Ed Bartosh
and /bin to the list of paths makes find_binary_path to produce more reliable results. [YOCTO #7122] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/lib/wic/utils/fs_related.py | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/lib/wic/utils

[OE-core] [wic][PATCH] wic: Print bitbake error output

2015-04-04 Thread Ed Bartosh
Added bitbake error output to wic error message to make it more descriptive. [YOCTO #6911] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/lib/wic/utils/oe/misc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/lib/wic/utils/oe/misc.py b/scripts/lib/wic/utils/oe

Re: [OE-core] [wic][PATCH] wic: extended list of paths in find_binary_path

2015-04-04 Thread Ed Bartosh
On Sat, Apr 04, 2015 at 03:34:59PM -0300, Otavio Salvador wrote: Em 04/04/2015 14:21, Ed Bartosh ed.bart...@linux.intel.com escreveu: wic requires tools that are not always possible to find in $PATH. This causes wic to fail with confusing errors like this: External command 'parted

[OE-core] [PATCH] rootfs.py: Improve rpm log_check_regex

2015-05-20 Thread Ed Bartosh
Current regex can cause false negatives if paths in bitbake log files contain ERR or Fail. do_rootfs fails with return code 1 in this case. Improved regexp is based on error messages produced by rpm. Those are found by analyzing rpm source code. [YOCTO #7789] Signed-off-by: Ed Bartosh ed.bart

[OE-core] [wic][PATCH] wic: Make sure file exists before removing it

2015-05-21 Thread Ed Bartosh
Bunch of os.remove calls were added to the partition.py lately. They're causing wic to fail with OSError: [Errno 2] No such file or directory if file doesn't exist. Added check for file existence to all recently added calls of os.remove. That should fix this regression. Signed-off-by: Ed Bartosh

[OE-core] [wic][PATCH 4/4] wic: pylinted partitionedfs.py

2015-06-05 Thread Ed Bartosh
Fixed some pylint findings in partitionedfs.py Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py index dcb63e5..902548f 100644 --- a/scripts/lib/wic/utils/partitionedfs.py +++ b/scripts/lib/wic/utils

[OE-core] [wic][PATCH 0/4] Code cleanup and refactoring

2015-06-05 Thread Ed Bartosh
Hi, This patchset includes cleanup and refactoring patches made during implementation of partition UUID support. Without this work I'd end up in duplicating a lot of code, so I decided to clean it up a bit. Please, review. Ed Bartosh (4): wic: removed exec_cmd_quiet and exec_native_cmd_quiet

[OE-core] [wic][PATCH 2/4] wic: move checks to exec_native_cmd

2015-06-05 Thread Ed Bartosh
Checked for return code and output of native commands inside exec_native_cmd. Removed similar code from a lot of places where exec_native_cmd is called. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic

[OE-core] [wic][PATCH 3/4] wic: replaced __run_parted with exec_native_cmd

2015-06-05 Thread Ed Bartosh
There is no need for yet another wrapper around exec_native_cmd. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py index 8fd44a6..dcb63e5 100644 --- a/scripts/lib/wic/utils/partitionedfs.py +++ b

[OE-core] [wic][PATCH 1/4] wic: removed exec_cmd_quiet and exec_native_cmd_quiet

2015-06-05 Thread Ed Bartosh
These functions are not used anywhere. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/utils/oe/misc.py b/scripts/lib/wic/utils/oe/misc.py index 2f5299d..9eaf039 100644 --- a/scripts/lib/wic/utils/oe/misc.py +++ b/scripts/lib/wic/utils/oe/misc.py @@ -63,15 +63,6

[OE-core] [wic][PATCH 6/9] wic: Set type GUID and UUID for partition

2015-06-05 Thread Ed Bartosh
Set type GUID and UUID for partition using sgdisk utility. Type GUID can be specified for partition in .wks with --part-type option. UUID is generated when --use-uuid option is specified for partition. [YOCTO #7716] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib

[OE-core] [wic][PATCH 5/9] wic: add parameter 'uuid' to Image.add_partition method

2015-06-05 Thread Ed Bartosh
With this parameter it's possible to pass generated UUID into Image class to set it for partition when it's created. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py index 36150c9..2290ecd 100644 --- a/scripts

[OE-core] [wic][PATCH 4/9] wic: refactored getting root device name

2015-06-05 Thread Ed Bartosh
Replaced DirectImageCreator._get_boot_config private method with a 'rootdev' property. Simplified the code and API. Used 'uuid' property instead of incorrectly used 'part_type'. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic

[OE-core] [wic][PATCH 9/9] wic: Add help for --part-type and --use-uuid options

2015-06-05 Thread Ed Bartosh
Added help for two wks partition options specific to GUID partition table and globally unique identificators (GUID). Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py index e365a07..14f0ff1 100644 --- a/scripts/lib/image

[OE-core] [wic][PATCH 4/9] wic: Refactored getting root device name

2015-06-05 Thread Ed Bartosh
Replaced DirectImageCreator._get_boot_config private method with a 'rootdev' property. Simplified the code and API. Used 'uuid' property instead of incorrectly used 'part_type'. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic

[OE-core] [wic][PATCH 5/9] wic: Add parameter 'uuid' to Image.add_partition method

2015-06-05 Thread Ed Bartosh
With this parameter it's possible to pass generated UUID into Image class to set it for partition when it's created. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py index 36150c9..2290ecd 100644 --- a/scripts

[OE-core] [wic][PATCH 1/9] wic: Add --use-uuid partition option

2015-06-05 Thread Ed Bartosh
Added --use-uuid option to the configuration of wks parser. Processing of this option will be implemented in the following commits. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart

[OE-core] [wic][PATCH 0/9] UUID support

2015-06-05 Thread Ed Bartosh
issues caused by using device names in kernel commandline as GUID doesn't change unlike device names. Ed Bartosh (9): wic: Add --use-uuid partition option wic: Generate random uuid for partition wic: Fix format string wic: Refactored getting root device name wic: Add parameter 'uuid

[OE-core] [wic][PATCH 2/9] wic: Generate random uuid for partition

2015-06-05 Thread Ed Bartosh
'uuid' attribute of partition object is set to generated uuid when --use-uuid option is used for partition in .wks file. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands

[OE-core] [wic][PATCH 3/9] wic: Fix format string

2015-06-05 Thread Ed Bartosh
wic crashes with TypeError: %d format: a number is required, not str Due to incorrect format used for Wic_PartData.extra_size attribute. Using %s instead of %d should fix the crash. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/kickstart/custom_commands

[OE-core] [wic][PATCH 2/9] wic: generate random uuid for partition

2015-06-05 Thread Ed Bartosh
'uuid' attribute of partition object is set to generated uuid when --use-uuid option is used for partition in .wks file. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands

[OE-core] [wic][PATCH 3/9] wic: fixed format string

2015-06-05 Thread Ed Bartosh
wic crashes with TypeError: %d format: a number is required, not str Due to incorrect format used for Wic_PartData.extra_size attribute. Using %s instead of %d should fix the crash. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/kickstart/custom_commands

[OE-core] [wic][PATCH v2 4/9] wic: Refactored getting root device name

2015-06-05 Thread Ed Bartosh
Replaced DirectImageCreator._get_boot_config private method with a 'rootdev' property. Simplified the code and API. Used 'uuid' property instead of incorrectly used 'part_type'. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic

[OE-core] [wic][PATCH v2 3/9] wic: Fix format string

2015-06-05 Thread Ed Bartosh
wic crashes with TypeError: %d format: a number is required, not str Due to incorrect format used for Wic_PartData.extra_size attribute. Using %s instead of %d should fix the crash. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/kickstart/custom_commands

[OE-core] [wic][PATCH v2 0/9] UUID support

2015-06-05 Thread Ed Bartosh
issues caused by using device names in kernel commandline as GUID doesn't change unlike device names. Ed Bartosh (9): wic: Add --use-uuid partition option wic: Generate random uuid for partition wic: Fix format string wic: Refactored getting root device name wic: Add parameter 'uuid

[OE-core] [wic][PATCH 7/9] wic: Use partition UUID in directdisk-gpt

2015-06-05 Thread Ed Bartosh
Used --use-uuid option for root partition in directdisk-gpt.wks This is useful to have example of image with UUID support. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/image/canned-wks/directdisk-gpt.wks b/scripts/lib/image/canned-wks/directdisk-gpt.wks index

[OE-core] [wic][PATCH v2 1/9] wic: Add --use-uuid partition option

2015-06-05 Thread Ed Bartosh
Added --use-uuid option to the configuration of wks parser. Processing of this option will be implemented in the following commits. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart

[OE-core] [wic][PATCH 8/9] wic: testing: configured testing of gpt/UUID image

2015-06-05 Thread Ed Bartosh
Added runtime dependency to gptfdisk-native to wic test suite to be able to test modified directdisk-gpt with UUID support. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py index e97dd1d..358f09e 100644 --- a/meta/lib

[OE-core] [wic][PATCH 8/9] wic: oe-selftest: Configure testing of gpt/UUID image

2015-06-05 Thread Ed Bartosh
Added runtime dependency to gptfdisk-native to wic test suite to be able to test modified directdisk-gpt with UUID support. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py index e97dd1d..358f09e 100644 --- a/meta/lib

[OE-core] [wic][PATCH 6/9] wic: set type GUID and UUID for partition

2015-06-05 Thread Ed Bartosh
Set type GUID and UUID for partition using sgdisk utility. Type GUID can be specified for partition in .wks with --part-type option. UUID is generated when --use-uuid option is specified for partition. [YOCTO #7716] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib

[OE-core] [wic][PATCH v2 2/9] wic: Generate random uuid for partition

2015-06-05 Thread Ed Bartosh
'uuid' attribute of partition object is set to generated uuid when --use-uuid option is used for partition in .wks file. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands

[OE-core] [wic][PATCH v2 5/9] wic: Add parameter 'uuid' to Image.add_partition method

2015-06-05 Thread Ed Bartosh
With this parameter it's possible to pass generated UUID into Image class to set it for partition when it's created. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py index 36150c9..2290ecd 100644 --- a/scripts

[OE-core] [wic][PATCH v2 7/9] wic: Use partition UUID in directdisk-gpt

2015-06-05 Thread Ed Bartosh
Used --use-uuid option for root partition in directdisk-gpt.wks This is useful to have example of image with UUID support. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/image/canned-wks/directdisk-gpt.wks b/scripts/lib/image/canned-wks/directdisk-gpt.wks index

[OE-core] [wic][PATCH v2 6/9] wic: Set type GUID and UUID for partition

2015-06-05 Thread Ed Bartosh
Set type GUID and UUID for partition using sgdisk utility. Type GUID can be specified for partition in .wks with --part-type option. UUID is generated when --use-uuid option is specified for partition. [YOCTO #7716] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib

[OE-core] [wic][PATCH v2 8/9] wic: oe-selftest: Configure testing of gpt/UUID image

2015-06-05 Thread Ed Bartosh
Added runtime dependency to gptfdisk-native to wic test suite to be able to test modified directdisk-gpt with UUID support. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py index e97dd1d..358f09e 100644 --- a/meta/lib

[OE-core] [wic][PATCH v2 9/9] wic: Add help for --part-type and --use-uuid options

2015-06-05 Thread Ed Bartosh
Added help for two wks partition options specific to GUID partition table and globally unique identificators (GUID). Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py index e365a07..14f0ff1 100644 --- a/scripts/lib/image

[OE-core] [wic][PATCH] wic: Move validation of --ptable option to wks parser

2015-06-05 Thread Ed Bartosh
bootloader --ptable option has two valid choices: gpt and msdos Moved this check to wks parser by changing option type to 'choice'. Removed similar checks from 5 other places. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/lib/wic/kickstart/custom_commands/micboot.py | 3

Re: [OE-core] [wic][PATCH 3/4] wic: replaced __run_parted with exec_native_cmd

2015-06-08 Thread Ed Bartosh
On Fri, Jun 05, 2015 at 05:33:12PM +0100, Ross Burton wrote: On 05/06/2015 07:13, Ed Bartosh wrote: There is no need for yet another wrapper around exec_native_cmd. This doesn't appear to apply to master, can you rebase? (or does it depend on your other series?) It depends

Re: [OE-core] [wic][PATCH 4/6] wic: Implement image compressing

2015-06-24 Thread Ed Bartosh
or config value doesn't look convenient to use from my point of view. Can you propose something better than that? Regards, Ed Philip On 06/23/2015 05:53 AM, Ed Bartosh wrote: Implemented compressing result image with specified compressor. Updated reporting code to show compressed image

[OE-core] [wic][PATCH 4/6] wic: Implement image compressing

2015-06-23 Thread Ed Bartosh
Implemented compressing result image with specified compressor. Updated reporting code to show compressed image. [YOCTO #7593] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py index f3f20e0..2ea7e4e 100644

[OE-core] [wic][PATCH 5/6] wic: Make code more pythonic

2015-06-23 Thread Ed Bartosh
Used more pythonic way to make a list. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py index d5c34b4..47950f8 100644 --- a/scripts/lib/image/engine.py +++ b/scripts/lib/image/engine.py @@ -216,23 +216,13 @@ def

  1   2   3   4   5   6   7   8   9   10   >