summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bblayers
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-09 15:06:16 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-10 23:48:16 (GMT)
commit7283a0b3b6ca49d0d2e13593333a580ef10439a8 (patch)
tree505ca132a571b435db70a7e36169c960ab896771 /bitbake/lib/bblayers
parentdf90345d33730003300159e0c3e55c0efc61c7c2 (diff)
downloadpoky-7283a0b3b6ca49d0d2e13593333a580ef10439a8.tar.gz
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: ceddb5b3d229b83c172656053cd29aeb521fcce0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bblayers')
-rw-r--r--bitbake/lib/bblayers/action.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bblayers/action.py b/bitbake/lib/bblayers/action.py
index 5b78195..f05f5d3 100644
--- a/bitbake/lib/bblayers/action.py
+++ b/bitbake/lib/bblayers/action.py
@@ -50,10 +50,10 @@ class ActionPlugin(LayerPlugin):
50 if not (args.force or notadded): 50 if not (args.force or notadded):
51 try: 51 try:
52 self.tinfoil.run_command('parseConfiguration') 52 self.tinfoil.run_command('parseConfiguration')
53 except bb.tinfoil.TinfoilUIException: 53 except (bb.tinfoil.TinfoilUIException, bb.BBHandledException):
54 # Restore the back up copy of bblayers.conf 54 # Restore the back up copy of bblayers.conf
55 shutil.copy2(backup, bblayers_conf) 55 shutil.copy2(backup, bblayers_conf)
56 bb.fatal("Parse failure with the specified layer added") 56 bb.fatal("Parse failure with the specified layer added, aborting.")
57 else: 57 else:
58 for item in notadded: 58 for item in notadded:
59 sys.stderr.write("Specified layer %s is already in BBLAYERS\n" % item) 59 sys.stderr.write("Specified layer %s is already in BBLAYERS\n" % item)