When an exception occurs during the main part of update_layer, we were catching and printing it but that's not enough - we need to do the following as well:
* Use logger.error() to print the exception information, so that it gets logged and highlighted as an error in the layer update * Exit with a non-zero return code so that update.py knows it has failed Signed-off-by: Paul Eggleton <paul.eggle...@linux.intel.com> --- layerindex/update_layer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layerindex/update_layer.py b/layerindex/update_layer.py index 2b39e8ef..d9c93360 100644 --- a/layerindex/update_layer.py +++ b/layerindex/update_layer.py @@ -808,7 +808,8 @@ def main(): pass except: import traceback - traceback.print_exc() + logger.error(traceback.format_exc().rstrip()) + sys.exit(1) finally: if tinfoil and (LooseVersion(bb.__version__) > LooseVersion("1.27")): tinfoil.shutdown() -- 2.17.1 -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto