cooker: Ensure reparsing is handled correctly
PATCH 1/2 cooker: Ensure reparsing is handled correctly
From tinfoil, if you edit bblayers.conf and break it, then call parseConfiguration (e.g. by adding a bad layer with bitbake-layers), the system doens't show any parse error yet it should.
Add in a call to the updateCache function so that things really are reparsed when requested.
Partially fixes [YOCTO #14054]
Signed-off-by Richard Purdie <[email protected]>
--- lib/bb/cooker.py | 2 ++ 1 file changed, 2 insertions(+)
lib/bb/cooker.py +2 -0
@@ -411,6 +411,8 @@ class BBCooker: self.data.disableTracking() def parseConfiguration(self): + self.updateCacheSync() + # Change nice level if we're asked to nice = self.data.getVar("BB_NICE_LEVEL") if nice:
Signature · 1 line
2.27.0
PATCH 2/2 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]
Signed-off-by Richard Purdie <[email protected]>
--- lib/bblayers/action.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/bblayers/action.py +2 -2
@@ -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)
Signature · 1 line
2.27.0