Skip to contentSkip to conversation

[1.46][PATCH 0/2] Patch review

bitbake Steve Sakoman 1 participant 3 messages Dec 3, 2021

lore
Share & tools
lore
#0 lore raw

Please review this set of patches for dunfell/1.46 and have comments back by end of day Tuesday.

Passed a-full on autobuilder:

https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/2988

with the exception of a known autobuilder intermittent issue (on qemuppc test) which passed on subsequent retest:

https://autobuilder.yoctoproject.org/typhoon/#/builders/63/builds/4402

The following changes since commit 7fdd43c5cbde38daa013076de2fdedcf3c3d3107:

process/knotty: Improve early exception handling (2021-11-22 04:15:15 -1000)

are available in the Git repository at:

git://git.openembedded.org/bitbake-contrib stable/1.46-nut
http://cgit.openembedded.org/bitbake-contrib/log/?h=stable/1.46-nut

Richard Purdie (2):
cooker: Ensure reparsing is handled correctly bblayers/action: When adding layers, catch BBHandledException

 lib/bb/cooker.py       | 2 ++
 lib/bblayers/action.py | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

[bitbake][dunfell][1.46][PATCH 1/2] cooker: Ensure reparsing is handled correctly

From: Richard Purdie <[email protected]>

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]

(cherry picked from commit e655f9361b9c3b77906b8e06b5cc76bc5180640e)
---
 lib/bb/cooker.py | 2 ++
 1 file changed, 2 insertions(+)
lib/bb/cooker.py +2 -0
index 000faf82..8d9ca680 100644
@@ -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.25.1
#2 lore raw

[bitbake][dunfell][1.46][PATCH 2/2] bblayers/action: When adding layers, catch BBHandledException

In reply to Steve Sakoman

From: Richard Purdie <[email protected]>

When adding a layer, parse error can occur, raising BBHandledException. Catch this and error, aborting the layer add to meet user expectations.

[YOCTO #14054]

(cherry picked from commit ceddb5b3d229b83c172656053cd29aeb521fcce0)
---
 lib/bblayers/action.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/bblayers/action.py +2 -2
index d6459d66..d2f9c1bb 100644
@@ -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.25.1