[oe-commits] [bitbake] 02/19: cookerdata/cooker: Restore original datastore upon client disconnect
git at git.openembedded.org
git at git.openembedded.org
Fri Jul 21 07:45:53 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository bitbake.
commit 67ae612ab890965357d24a9bd35610cf813b79ba
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Tue Jul 18 17:50:24 2017 +0100
cookerdata/cooker: Restore original datastore upon client disconnect
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/cooker.py | 2 ++
lib/bb/cookerdata.py | 9 +++++++++
2 files changed, 11 insertions(+)
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index e27763e..daffe67 100644
--- a/lib/bb/cooker.py
+++ b/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/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
index d05abfe..55c6ea8 100644
--- a/lib/bb/cookerdata.py
+++ b/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)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list