From d875c5e57b91c415292e530ce90f354107581be6 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 3 Dec 2021 08:27:12 -1000 Subject: bitbake: bblayers/action: When adding layers, catch BBHandledException When adding a layer, parse error can occur, raising BBHandledException. Catch this and error, aborting the layer add to meet user expectations. [YOCTO #14054] (Bitbake rev: f18b65d0b9a6b983d53bde491e1bf2ca56949444) Signed-off-by: Richard Purdie (cherry picked from commit ceddb5b3d229b83c172656053cd29aeb521fcce0) Signed-off-by: Steve Sakoman Signed-off-by: Richard Purdie --- bitbake/lib/bblayers/action.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/bblayers') diff --git a/bitbake/lib/bblayers/action.py b/bitbake/lib/bblayers/action.py index d6459d6617..d2f9c1bbde 100644 --- a/bitbake/lib/bblayers/action.py +++ b/bitbake/lib/bblayers/action.py @@ -50,10 +50,10 @@ class ActionPlugin(LayerPlugin): if not (args.force or notadded): try: self.tinfoil.run_command('parseConfiguration') - except bb.tinfoil.TinfoilUIException: + except (bb.tinfoil.TinfoilUIException, bb.BBHandledException): # Restore the back up copy of bblayers.conf shutil.copy2(backup, bblayers_conf) - bb.fatal("Parse failure with the specified layer added") + bb.fatal("Parse failure with the specified layer added, aborting.") else: for item in notadded: sys.stderr.write("Specified layer %s is already in BBLAYERS\n" % item) -- cgit v1.2.3-54-g00ecf