diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-04-18 18:09:46 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-04-19 13:36:45 +0100 |
commit | 3b8a656d3ccb543c32696229184ebf12237ad38e (patch) | |
tree | 711b46c38aff38220f66b3e02ffcc02f1654b8d3 /lib/bb/cookerdata.py | |
parent | e2879c60e905d7566091d40eab330372fa001313 (diff) | |
download | bitbake-contrib-3b8a656d3ccb543c32696229184ebf12237ad38e.tar.gz |
cookerdata: Allow ~ in bblayers
Implemented processing of ~ in bblayer's paths if HOME
environment variable is approved.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/cookerdata.py')
-rw-r--r-- | lib/bb/cookerdata.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py index 6c11a60e0..630ee2758 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') |