Re: [OE-core][PATCH] checklayer: Skip layers without a collection
On Thu, May 28, 2020 at 4:13 AM Joshua Watt wrote: > I would like to backport this to dunfell if possible. I've already got it in the next batch of patches! I really do appreciate the heads up on things that are suitable, I don't want to miss anything :-) You can find what I'm currently testing at: https://git.openembedded.org/openembedded-core-contrib/log/?h=stable/dunfell-nut I try to send a batch out for review at the beginning of each week, so this patch will be sent out with next week's group. Steve > On 5/22/20 5:08 PM, Joshua Watt wrote: > > 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 > > --- > > scripts/lib/checklayer/__init__.py | 3 +++ > > 1 file changed, 3 insertions(+) > > > > 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 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#138853): https://lists.openembedded.org/g/openembedded-core/message/138853 Mute This Topic: https://lists.openembedded.org/mt/74409708/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core][PATCH] checklayer: Skip layers without a collection
Steve, I would like to backport this to dunfell if possible. Thanks! On 5/22/20 5:08 PM, Joshua Watt wrote: 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 --- scripts/lib/checklayer/__init__.py | 3 +++ 1 file changed, 3 insertions(+) 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 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#138848): https://lists.openembedded.org/g/openembedded-core/message/138848 Mute This Topic: https://lists.openembedded.org/mt/74409708/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core][PATCH] 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 --- scripts/lib/checklayer/__init__.py | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#138612): https://lists.openembedded.org/g/openembedded-core/message/138612 Mute This Topic: https://lists.openembedded.org/mt/74409708/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-