1
0
mirror of https://git.yoctoproject.org/poky synced 2026-04-20 11:28:58 +00:00

bitbake: cooker/command: Fix disconnection handling

After the recent init changes, if a client disconnects before issuing a
command, the cooker can break in the reset handlers. Add some guards
in the code to prevent this.

(Bitbake rev: 12605e30e4c4e1ae6a67c97363b892ebf0b9566c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2020-09-12 15:25:04 +01:00
parent 909a9f5e8e
commit 79adf16931
2 changed files with 5 additions and 3 deletions

View File

@@ -143,7 +143,8 @@ class Command:
self.cooker.finishcommand()
def reset(self):
self.remotedatastores = bb.remotedata.RemoteDatastores(self.cooker)
if self.remotedatastores:
self.remotedatastores = bb.remotedata.RemoteDatastores(self.cooker)
class CommandsSync:
"""

View File

@@ -1703,8 +1703,9 @@ class BBCooker:
self.finishcommand()
self.extraconfigdata = {}
self.command.reset()
self.databuilder.reset()
self.data = self.databuilder.data
if hasattr(self, "data"):
self.databuilder.reset()
self.data = self.databuilder.data
self.parsecache_valid = False
self.baseconfig_valid = False