update.py: handle change to cooker structure in newer BitBake

The cooker module has been refactored in BitBake master and this moved
and renamed the _parse() function; change the update script to handle
that (whilst still handling older versions).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
Paul Eggleton 2013-05-22 15:30:55 +01:00
parent a490f057d6
commit 611ed1dece

View File

@ -128,7 +128,12 @@ def update_machine_conf_file(path, machine):
def parse_layer_conf(layerdir, data):
data.setVar('LAYERDIR', str(layerdir))
data = bb.cooker._parse(os.path.join(layerdir, "conf", "layer.conf"), data)
if hasattr(bb, "cookerdata"):
# Newer BitBake
data = bb.cookerdata.parse_config_file(os.path.join(layerdir, "conf", "layer.conf"), data)
else:
# Older BitBake (1.18 and below)
data = bb.cooker._parse(os.path.join(layerdir, "conf", "layer.conf"), data)
data.expandVarref('LAYERDIR')
def get_branch(branchname):