Fixes for devtool QA issues on the YP autobuilder
cover Fixes for devtool QA issues on the YP autobuilder
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(-)
Signature · 1 line
1.9.3
PATCH 1/2 bitbake-layers: fix error handling in add-layer / remove-layer
* 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
--- bin/bitbake-layers | 2 +- lib/bb/utils.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-)
bin/bitbake-layers +1 -1
@@ -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):
lib/bb/utils.py +8 -0
@@ -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)
Signature · 1 line
1.9.3
PATCH 2/2 utils: make edit_metadata_file() handle VARIABLE +=
In reply to Paul EggletonThis 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.
--- lib/bb/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/utils.py +1 -1
@@ -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 = ''
Signature · 1 line
1.9.3