bitbake: cookerdata/cooker: Restore original datastore upon client disconnect

(Bitbake rev: 67ae612ab890965357d24a9bd35610cf813b79ba)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2017-07-18 17:50:24 +01:00
parent 4602408c69
commit 1cfefc8b0f
2 changed files with 11 additions and 0 deletions

View File

@@ -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()

View File

@@ -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)