]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cooker: Ensure BB_CONSOLE remains correct over server resets
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 11 Oct 2015 09:22:26 +0000 (10:22 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 29 Oct 2015 07:35:28 +0000 (07:35 +0000)
The console log data is written to is created at console initialisation
time and does not change over reset events. This ensures the
BB_CONSOLELOG value is correct over such resets by preserving it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/cooker.py

index 276e42eec2966fbcfa29ad406b1a2991cd48b3b5..4df88818fc4681970933d807746031b5418cac0f 100644 (file)
@@ -255,6 +255,11 @@ class BBCooker:
         self.state = state.initial
         self.caches_array = []
 
+        # Need to preserve BB_CONSOLELOG over resets
+        consolelog = None
+        if hasattr(self, "data"):
+            consolelog = self.data.getVar("BB_CONSOLELOG", True)
+
         if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset:
             self.enableDataTracking()
 
@@ -281,6 +286,8 @@ class BBCooker:
         self.data = self.databuilder.data
         self.data_hash = self.databuilder.data_hash
 
+        if consolelog:
+            self.data.setVar("BB_CONSOLELOG", consolelog)
 
         # we log all events to a file if so directed
         if self.configuration.writeeventlog: