mirror of
https://git.yoctoproject.org/poky
synced 2026-03-16 04:09:39 +01:00
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>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user