[bitbake-devel] [PATCH] bitbake: Allow ~ in bblayers

Richard Purdie richard.purdie at linuxfoundation.org
Fri Apr 17 10:41:57 UTC 2015


On Thu, 2015-04-16 at 21:28 +0300, Ed Bartosh wrote:
> Implemented processing of ~ in bblayer's paths if HOME
> environment variable is approved.
> 
> Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
> ---
>  bitbake/lib/bb/cookerdata.py | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py
> index 6c11a60..bf08c63 100644
> --- a/bitbake/lib/bb/cookerdata.py
> +++ b/bitbake/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:

can we change this to 

if 'HOME' in approved and '~' in layer:

simply so that we can more easily remember what this code is doing in
the future?

Cheers,

Richard

> +                    layer = os.path.expanduser(layer)
>                  data.setVar('LAYERDIR', layer)
>                  data = parse_config_file(os.path.join(layer, "conf", "layer.conf"), data)
>                  data.expandVarref('LAYERDIR')
> -- 
> 2.1.4
> 





More information about the bitbake-devel mailing list