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-06-05 21:36:30 +0100
commit5b65a822d6fd2f539969cef6a08db89d465f07f8 (patch)
treebcfe8006393bc7bdf1d829948fec4ed89aa4c1b7
parente9c66dd898be4b02c2d1369b63f6789a9904a8b1 (diff)
downloadpoky-5b65a822d6fd2f539969cef6a08db89d465f07f8.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 (From OE-Core rev: ae65adf471a9ad04c6a44bf020a28f1006db106a) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 26090a2861ebe21224aaf89d7be0c0a89ca58e48) Signed-off-by: Steve Sakoman <steve@sakoman.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):
143 143
144def _find_layer_depends(depend, layers): 144def _find_layer_depends(depend, layers):
145 for layer in layers: 145 for layer in layers:
146 if 'collections' not in layer:
147 continue
148
146 for collection in layer['collections']: 149 for collection in layer['collections']:
147 if depend == collection: 150 if depend == collection:
148 return layer 151 return layer