[gnome-continuous-yocto/gnomeostree-3.28-rocko: 6813/8267] bitbake: cookerdata/cooker: Restore original datastore upon client disconnect
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 6813/8267] bitbake: cookerdata/cooker: Restore original datastore upon client disconnect
- Date: Sun, 17 Dec 2017 05:22:17 +0000 (UTC)
commit 1cfefc8b0f5337c256597c4312517227124dd2e6
Author: Richard Purdie <richard purdie linuxfoundation org>
Date: Tue Jul 18 17:50:24 2017 +0100
bitbake: cookerdata/cooker: Restore original datastore upon client disconnect
(Bitbake rev: 67ae612ab890965357d24a9bd35610cf813b79ba)
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
bitbake/lib/bb/cooker.py | 2 ++
bitbake/lib/bb/cookerdata.py | 9 +++++++++
2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index e27763e..daffe67 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1566,6 +1566,8 @@ class BBCooker:
def clientComplete(self):
"""Called when the client is done using the server"""
self.finishcommand()
+ self.databuilder.reset()
+ self.data = self.databuilder.data
def server_main(cooker, func, *args):
cooker.pre_serve()
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py
index d05abfe..55c6ea8 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]