]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cookerdata: Allow ~ in bblayers
authorEd Bartosh <ed.bartosh@linux.intel.com>
Sat, 18 Apr 2015 15:09:46 +0000 (18:09 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 19 Apr 2015 12:36:45 +0000 (13:36 +0100)
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>
lib/bb/cookerdata.py

index 6c11a60e0f9ee565320e5cacd147d54967c83dde..630ee27589efefd88a817ca3e087de22650e2c4f 100644 (file)
@@ -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')