summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2020-05-22 17:08:26 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-24 23:55:31 +0100
commit26090a2861ebe21224aaf89d7be0c0a89ca58e48 (patch)
tree97674856e6a16f0deacc744ac26abb086cd3975b
parent424b65d57b16e3f0ad29a5115f048aaba4d95473 (diff)
downloadopenembedded-core-26090a2861ebe21224aaf89d7be0c0a89ca58e48.tar.gz
checklayer: Skip layers without a collection
As in other places in the file, skip layers that don't define a collection when searching for a layer to resolve a dependency. Fixes KeyError exceptions when attempting to access the layer collections later Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--scripts/lib/checklayer/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/lib/checklayer/__init__.py b/scripts/lib/checklayer/__init__.py
index 5aeec2f00f..1138000275 100644
--- a/scripts/lib/checklayer/__init__.py
+++ b/scripts/lib/checklayer/__init__.py
@@ -143,6 +143,9 @@ def detect_layers(layer_directories, no_auto):
def _find_layer_depends(depend, layers):
for layer in layers:
+ if 'collections' not in layer:
+ continue
+
for collection in layer['collections']:
if depend == collection:
return layer