From: Ed Bartosh Date: Sat, 18 Apr 2015 15:09:46 +0000 (+0300) Subject: cookerdata: Allow ~ in bblayers X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b8a656d3ccb543c32696229184ebf12237ad38e;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git cookerdata: Allow ~ in bblayers Implemented processing of ~ in bblayer's paths if HOME environment variable is approved. Signed-off-by: Ed Bartosh Signed-off-by: Richard Purdie --- diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py index 6c11a60e0f9..630ee27589e 100644 --- a/lib/bb/cookerdata.py +++ b/lib/bb/cookerdata.py @@ -269,8 +269,11 @@ class CookerDataBuilder(object): layers = (data.getVar('BBLAYERS', True) or "").split() data = bb.data.createCopy(data) + approved = bb.utils.approved_variables() for layer in layers: parselog.debug(2, "Adding layer %s", layer) + if 'HOME' in approved and '~' in layer: + layer = os.path.expanduser(layer) data.setVar('LAYERDIR', layer) data = parse_config_file(os.path.join(layer, "conf", "layer.conf"), data) data.expandVarref('LAYERDIR')