All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cooker: Only change self.data if it exists
@ 2014-03-28 11:06 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2014-03-28 11:06 UTC (permalink / raw)
  To: bitbake-devel

With the change to more optimal default featureset behaviour, a race was
exposed by hob where the code may try and change self.data before it
exists. This change avoids that.

When the datastore is created, the cooker configuration is used so
data tracking is correctly handled regardless.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index e81d887..5d3ac60 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -207,11 +207,13 @@ class BBCooker:
 
     def enableDataTracking(self):
         self.configuration.tracking = True
-        self.data.enableTracking()
+        if hasattr(self, "data"):
+            self.data.enableTracking()
 
     def disableDataTracking(self):
         self.configuration.tracking = False
-        self.data.disableTracking()
+        if hasattr(self, "data"):
+            self.data.disableTracking()
 
     def modifyConfigurationVar(self, var, val, default_file, op):
         if op == "append":




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-03-28 11:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-28 11:06 [PATCH] cooker: Only change self.data if it exists Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.