* [PATCH 0/2] Fixes for devtool QA issues on the YP autobuilder @ 2014-12-29 11:14 Paul Eggleton 2014-12-29 11:14 ` [PATCH 1/2] bitbake-layers: fix error handling in add-layer / remove-layer Paul Eggleton 2014-12-29 11:14 ` [PATCH 2/2] utils: make edit_metadata_file() handle VARIABLE += Paul Eggleton 0 siblings, 2 replies; 3+ messages in thread From: Paul Eggleton @ 2014-12-29 11:14 UTC (permalink / raw) To: bitbake-devel These fix the code in bitbake-layers and lib/bb/utils.py that OE's devtool and its QA tests use so that the tests should now pass. The following changes since commit 10a47b1ec7470c9e8c4ffe0bb35cdf6d1bb2ee2e: fetch2/wget: Fix horrible temp file handling (2014-12-23 12:35:06 +0000) are available in the git repository at: git://git.yoctoproject.org/poky-contrib paule/bblayers-fixes http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=paule/bblayers-fixes Paul Eggleton (2): bitbake-layers: fix error handling in add-layer / remove-layer utils: make edit_metadata_file() handle VARIABLE += bin/bitbake-layers | 2 +- lib/bb/utils.py | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) -- 1.9.3 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] bitbake-layers: fix error handling in add-layer / remove-layer 2014-12-29 11:14 [PATCH 0/2] Fixes for devtool QA issues on the YP autobuilder Paul Eggleton @ 2014-12-29 11:14 ` Paul Eggleton 2014-12-29 11:14 ` [PATCH 2/2] utils: make edit_metadata_file() handle VARIABLE += Paul Eggleton 1 sibling, 0 replies; 3+ messages in thread From: Paul Eggleton @ 2014-12-29 11:14 UTC (permalink / raw) To: bitbake-devel * Fix add-layer error message when a layer is already in BBLAYERS * Ensure we show an error message if we can't find BBLAYERS at all Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> --- bin/bitbake-layers | 2 +- lib/bb/utils.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/bin/bitbake-layers b/bin/bitbake-layers index edb4d2f..9879498 100755 --- a/bin/bitbake-layers +++ b/bin/bitbake-layers @@ -130,7 +130,7 @@ usage: add-layer <layerdir> (notadded, _) = bb.utils.edit_bblayers_conf(bblayers_conf, layerdir, None) if notadded: for item in notadded: - sys.stderr.write("Specified layer %s not in BBLAYERS\n" % item) + sys.stderr.write("Specified layer %s is already in BBLAYERS\n" % item) def do_remove_layer(self, dirname): diff --git a/lib/bb/utils.py b/lib/bb/utils.py index f26349f..ef8cd4d 100644 --- a/lib/bb/utils.py +++ b/lib/bb/utils.py @@ -1012,7 +1012,11 @@ def edit_bblayers_conf(bblayers_conf, add, remove): addlayers = layerlist_param(add) removelayers = layerlist_param(remove) + # Need to use a list here because we can't set non-local variables from a callback in python 2.x + bblayercalls = [] + def handle_bblayers(varname, origvalue): + bblayercalls.append(varname) updated = False bblayers = [remove_trailing_sep(x) for x in origvalue.split()] if removelayers: @@ -1040,5 +1044,9 @@ def edit_bblayers_conf(bblayers_conf, add, remove): return (origvalue, 2, False) edit_metadata_file(bblayers_conf, ['BBLAYERS'], handle_bblayers) + + if not bblayercalls: + raise Exception('Unable to find BBLAYERS in %s' % bblayers_conf) + return (notadded, notremoved) -- 1.9.3 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] utils: make edit_metadata_file() handle VARIABLE += 2014-12-29 11:14 [PATCH 0/2] Fixes for devtool QA issues on the YP autobuilder Paul Eggleton 2014-12-29 11:14 ` [PATCH 1/2] bitbake-layers: fix error handling in add-layer / remove-layer Paul Eggleton @ 2014-12-29 11:14 ` Paul Eggleton 1 sibling, 0 replies; 3+ messages in thread From: Paul Eggleton @ 2014-12-29 11:14 UTC (permalink / raw) To: bitbake-devel This is a little crude as the usage basically ignores that you're doing an append operation, but for a lot of cases it will be sufficient. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> --- lib/bb/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bb/utils.py b/lib/bb/utils.py index ef8cd4d..90090b2 100644 --- a/lib/bb/utils.py +++ b/lib/bb/utils.py @@ -923,7 +923,7 @@ def edit_metadata_file(meta_file, variables, func): """ var_res = {} for var in variables: - var_res[var] = re.compile(r'^%s[ \t]*[?=]+' % var) + var_res[var] = re.compile(r'^%s[ \t]*[?+]*=' % var) updated = False varset_start = '' -- 1.9.3 ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-12-29 11:14 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-12-29 11:14 [PATCH 0/2] Fixes for devtool QA issues on the YP autobuilder Paul Eggleton 2014-12-29 11:14 ` [PATCH 1/2] bitbake-layers: fix error handling in add-layer / remove-layer Paul Eggleton 2014-12-29 11:14 ` [PATCH 2/2] utils: make edit_metadata_file() handle VARIABLE += Paul Eggleton
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.