From 1cfefc8b0f5337c256597c4312517227124dd2e6 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 18 Jul 2017 17:50:24 +0100 Subject: bitbake: cookerdata/cooker: Restore original datastore upon client disconnect (Bitbake rev: 67ae612ab890965357d24a9bd35610cf813b79ba) Signed-off-by: Richard Purdie --- bitbake/lib/bb/cookerdata.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'bitbake/lib/bb/cookerdata.py') diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py index d05abfe745..55c6ea83cb 100644 --- a/bitbake/lib/bb/cookerdata.py +++ b/bitbake/lib/bb/cookerdata.py @@ -328,6 +328,15 @@ class CookerDataBuilder(object): logger.exception("Error parsing configuration files") raise bb.BBHandledException + # Create a copy so we can reset at a later date when UIs disconnect + self.origdata = self.data + self.data = bb.data.createCopy(self.origdata) + self.mcdata[''] = self.data + + def reset(self): + self.data = bb.data.createCopy(self.origdata) + self.mcdata[''] = self.data + def _findLayerConf(self, data): return findConfigFile("bblayers.conf", data) -- cgit v1.2.3-54-g00ecf