summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bblayers/layerindex.py
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2018-07-23 22:29:10 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-02 10:18:27 +0100
commit0dea95093115acc08f6ad19dc931d532a601cbec (patch)
tree6965b98defcac897ab387e41b1cc14bc2c666912 /bitbake/lib/bblayers/layerindex.py
parentbb3228cc19ea412d809d59af34634abb81a115f8 (diff)
downloadpoky-0dea95093115acc08f6ad19dc931d532a601cbec.tar.gz
bitbake: 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. (Bitbake rev: 8aeaabf13db645f33495e00b82117327e153d70a) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bblayers/layerindex.py')
-rw-r--r--bitbake/lib/bblayers/layerindex.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/bitbake/lib/bblayers/layerindex.py b/bitbake/lib/bblayers/layerindex.py
index 9af385db59..53c858db16 100644
--- a/bitbake/lib/bblayers/layerindex.py
+++ b/bitbake/lib/bblayers/layerindex.py
@@ -239,19 +239,22 @@ class LayerIndexPlugin(ActionPlugin):
239 return 1 239 return 1
240 addlayers.append((subdir, name, layerdir)) 240 addlayers.append((subdir, name, layerdir))
241 if not args.show_only: 241 if not args.show_only:
242 localargs = argparse.Namespace()
243 localargs.layerdir = []
244 localargs.force = args.force
242 for subdir, name, layerdir in set(addlayers): 245 for subdir, name, layerdir in set(addlayers):
243 if os.path.exists(layerdir): 246 if os.path.exists(layerdir):
244 if subdir: 247 if subdir:
245 logger.plain("Adding layer \"%s\" to conf/bblayers.conf" % subdir) 248 logger.plain("Adding layer \"%s\" (%s) to conf/bblayers.conf" % (subdir, layerdir))
246 else: 249 else:
247 logger.plain("Adding layer \"%s\" to conf/bblayers.conf" % name) 250 logger.plain("Adding layer \"%s\" (%s) to conf/bblayers.conf" % (name, layerdir))
248 localargs = argparse.Namespace() 251 localargs.layerdir.append(layerdir)
249 localargs.layerdir = layerdir
250 localargs.force = args.force
251 self.do_add_layer(localargs)
252 else: 252 else:
253 break 253 break
254 254
255 if localargs.layerdir:
256 self.do_add_layer(localargs)
257
255 def do_layerindex_show_depends(self, args): 258 def do_layerindex_show_depends(self, args):
256 """Find layer dependencies from layer index. 259 """Find layer dependencies from layer index.
257""" 260"""