utils.py: Use get_layer_var() to get BBFILE_COLLECTIONS

The commit 38e6288c7d has added oe-core to
BBLAYERS by default, and then there will be multiple BBFILE_COLLECTIONS which
causes update.py failure to update layers (most of the dependencies or
recommends are missing), use get_layer_var() to get BBFILE_COLLECTIONS to fix
the problem since it can ignore the extra oe-core from BBFILE_COLLECTIONS.

Fix minor typos. Minor rewording.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
This commit is contained in:
Robert Yang 2022-12-16 08:42:51 -08:00 committed by Tim Orling
parent c7b02096e0
commit edb574ae7e

View File

@ -188,7 +188,7 @@ def _add_dependency(var, name, layerbranch, config_data, logger=None, required=T
logger.warn('Either set REMOVE_LAYER_DEPENDENCIES to remove them from the database, or fix conf/layer.conf')
def set_layerbranch_collection_version(layerbranch, config_data, logger=None):
layerbranch.collection = config_data.getVar('BBFILE_COLLECTIONS', True)
layerbranch.collection = get_layer_var(config_data, 'BBFILE_COLLECTIONS', logger)
ver_str = "LAYERVERSION_"
if layerbranch.collection:
layerbranch.collection = layerbranch.collection.strip()