From 611ed1decec2d9aa31c6f7f0ff349cb7160a5d83 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Wed, 22 May 2013 15:30:55 +0100 Subject: [PATCH] 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 --- layerindex/update.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/layerindex/update.py b/layerindex/update.py index 60baa92..d548aaf 100755 --- a/layerindex/update.py +++ b/layerindex/update.py @@ -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):