scripts/yocto-compat-layer.py: Add dependency validation in add_layer

Some layers don't have dependencies so add a validation to avoid
exception when trying to None.split().

(From OE-Core rev: 39103285029a0bb7b64dc5a305c484988b4c651a)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Aníbal Limón 2017-03-27 11:05:30 -06:00 committed by Richard Purdie
parent 1632f6623c
commit 7effe18700
1 changed files with 5 additions and 1 deletions

View File

@ -143,7 +143,11 @@ def add_layer(bblayersconf, layer, layers, logger):
logger.info('Adding layer %s' % layer['name'])
for collection in layer['collections']:
for depend in layer['collections'][collection]['depends'].split():
depends = layer['collections'][collection]['depends']
if not depends:
continue
for depend in depends.split():
# core (oe-core) is suppose to be provided
if depend == 'core':
continue