layerindex/utils.py: ignore 'core' in BBFILES_COLLECTIONS

Many layers append BBFILE_COLLECTIONS and therefore have 'core <layer>'

During update.py, this means we are likely not handling the collection we
expect:

WARNING: /opt/workdir/git___git_openembedded_org_meta-openembedded/meta-oe: multiple collections found, handling first one (core) only
BBFILE_COLLECTIONS = "core"

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
This commit is contained in:
Tim Orling 2022-04-10 10:41:02 -07:00
parent 271107f024
commit 2fe25da55e

View File

@ -44,6 +44,11 @@ def get_layer_var(config_data, var, logger):
collection = collection_list[0] collection = collection_list[0]
layerdir = config_data.getVar('LAYERDIR', True) layerdir = config_data.getVar('LAYERDIR', True)
if len(collection_list) > 1: if len(collection_list) > 1:
if collection_list[0] == 'core':
# Many layers append BBFILE_COLLECTIONS and therefore have 'core <layer>'
collection = collection_list[1]
logger.warn('%s: multiple collections found, ignoring the first one (\'core\') and handling (%s) only' % (layerdir, collection))
else:
logger.warn('%s: multiple collections found, handling first one (%s) only' % (layerdir, collection)) logger.warn('%s: multiple collections found, handling first one (%s) only' % (layerdir, collection))
if var == 'BBFILE_COLLECTIONS': if var == 'BBFILE_COLLECTIONS':
return collection return collection