Skip to contentSkip to conversation

cooker: Fix environment history printing

PATCH New Richard Purdie 1 participant 1 message Mar 10, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cooker: Fix environment history printing

bitbake -e is not showing variable history correctly for all variables. The issue was triggered by the change to knotty to default to enabling variable tracking in the base datastore but that exposed another issue.

The real problem is that calling reset() inside cooker reverts to the data tracking enabled by the UI for the base datastore, then turns off tracking. In the case of the environment printing code, it needs it to be left on.

Tweak the code to ensure data store tracking really is enabled.

The code here is clearly a bit of a mess but this at least fixes a clear regression until more invasive improvements can be made.

---
 lib/bb/cooker.py | 2 ++
 1 file changed, 2 insertions(+)
lib/bb/cooker.py +2 -0
index 6996e62375..f79dc2770d 100644
@@ -555,6 +555,8 @@ class BBCooker:
         if not orig_tracking:
             self.enableDataTracking()
             self.reset()
+            # reset() resets to the UI requested value so we have to redo this
+            self.enableDataTracking()
 
         def mc_base(p):
             if p.startswith('mc:'):
Signature · 1 line
2.32.0