[oe-commits] [bitbake] 02/19: cookerdata/cooker: Restore original datastore upon client disconnect

git at git.openembedded.org git at git.openembedded.org
Tue Jul 18 17:21:29 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository bitbake.

commit 258b2c54acc7b748cfc75706660d4ba69fced033
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 | 7 +++++++
 2 files changed, 9 insertions(+)

diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 2e8ccb3..10c2103 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -1567,6 +1567,8 @@ class BBCooker:
         """Called when the client is done using the server"""
         #if self.configuration.server_only:
         self.finishcommand()
+        self.databuilder.reset()
+        self.data = self.databuilder.data
         #else:
         #    self.shutdown(True)
 
diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
index 9d1d3d2..e6662d0 100644
--- a/lib/bb/cookerdata.py
+++ b/lib/bb/cookerdata.py
@@ -328,6 +328,13 @@ 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)
+
+    def reset(self):
+        self.data = bb.data.createCopy(self.origdata)
+
     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