[oe-commits] [bitbake] 01/05: bblayers/layerindex.py: Fix addition of layers
git at git.openembedded.org
git at git.openembedded.org
Tue Jul 31 22:26:17 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository bitbake.
commit ca6690681704363ba8e185caf35a38a37166ab21
Author: Mark Hatle <mark.hatle at windriver.com>
AuthorDate: Mon Jul 23 22:29:10 2018 -0400
bblayers/layerindex.py: Fix addition of layers
When a layer is added it needs to be in a list, otherwise the system will
error such as:
Specified layer directory / doesn't contain a conf/layer.conf file
Additionally, instead of calling the add layer function over and over, it
is better to add all of the new content in one command. Otherwise the
order is important as the system now checks if the layer can be added. For
instance, trying to add meta-python:
Layer Required by Git repository Subdirectory
===================================================================================================================
meta-python - git://git.openembedded.org/meta-openembedded meta-python
meta-oe meta-python git://git.openembedded.org/meta-openembedded meta-oe
openembedded-core meta-python git://git.openembedded.org/openembedded-core meta
Adding layer "meta-python" (.../oe-core/meta-openembedded/meta-python) to conf/bblayers.conf
ERROR: Layer 'meta-python' depends on layer 'openembedded-layer', but this layer is not enabled in your configuration
The system would try to add meta-python before the dependent meta-oe. Adding
them both at the same time resolves this issue.
Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bblayers/layerindex.py | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/lib/bblayers/layerindex.py b/lib/bblayers/layerindex.py
index 9af385d..53c858d 100644
--- a/lib/bblayers/layerindex.py
+++ b/lib/bblayers/layerindex.py
@@ -239,19 +239,22 @@ class LayerIndexPlugin(ActionPlugin):
return 1
addlayers.append((subdir, name, layerdir))
if not args.show_only:
+ localargs = argparse.Namespace()
+ localargs.layerdir = []
+ localargs.force = args.force
for subdir, name, layerdir in set(addlayers):
if os.path.exists(layerdir):
if subdir:
- logger.plain("Adding layer \"%s\" to conf/bblayers.conf" % subdir)
+ logger.plain("Adding layer \"%s\" (%s) to conf/bblayers.conf" % (subdir, layerdir))
else:
- logger.plain("Adding layer \"%s\" to conf/bblayers.conf" % name)
- localargs = argparse.Namespace()
- localargs.layerdir = layerdir
- localargs.force = args.force
- self.do_add_layer(localargs)
+ logger.plain("Adding layer \"%s\" (%s) to conf/bblayers.conf" % (name, layerdir))
+ localargs.layerdir.append(layerdir)
else:
break
+ if localargs.layerdir:
+ self.do_add_layer(localargs)
+
def do_layerindex_show_depends(self, args):
"""Find layer dependencies from layer index.
"""
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list