From: Richard Purdie Date: Sun, 11 Oct 2015 09:22:26 +0000 (+0100) Subject: cooker: Ensure BB_CONSOLE remains correct over server resets X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=335eb2db228f7543a49de71f063ac72b865c947a;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git cooker: Ensure BB_CONSOLE remains correct over server resets 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 --- diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 276e42eec29..4df88818fc4 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -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: