[bitbake-devel] [PATCH] cookerdata: print an error if layer dir does not exist

Leonardo Sandoval leonardo.sandoval.gonzalez at linux.intel.com
Tue May 24 14:09:55 UTC 2016



On 05/24/2016 02:25 AM, Markus Lehtonen wrote:
> Makes it easier for user to identify problems, e.g. typos, in BBLAYERS.
>
> [YOCTO #9507]
>
> Signed-off-by: Markus Lehtonen <markus.lehtonen at linux.intel.com>
> ---
>   lib/bb/cookerdata.py | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
> index 1615db5..7dfe7b5 100644
> --- a/lib/bb/cookerdata.py
> +++ b/lib/bb/cookerdata.py
> @@ -292,6 +292,10 @@ class CookerDataBuilder(object):
>               data = bb.data.createCopy(data)
>               approved = bb.utils.approved_variables()
>               for layer in layers:
> +                if not os.path.isdir(layer):
> +                    parselog.critical("Layer directory '%s' does not to exist! "
> +                                      "Please check BBLAYERS in %s" % (layer, layerconf))
> +                    sys.exit(1)

Markus, I am not familiar with this code, but instead of a sys.exit(1), 
would it be better to raise a exception instead (raise SystemExit(msg))?

>                   parselog.debug(2, "Adding layer %s", layer)
>                   if 'HOME' in approved and '~' in layer:
>                       layer = os.path.expanduser(layer)




More information about the bitbake-devel mailing list