mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 05:09:24 +00:00
bitbake: cooker: make sure state is properly used to accept clients
This patch fixes a bug where if the build is force stopped, subsequent clients cannot connect to the server due to unnecessary limits on setFeature. Additionally, we make sure that the state is properly reset even if the BuildCompleted event firing excepts for some reason. (Bitbake rev: 0b66b05169688aa4ddc4c54d175bb961b2f27fec) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
8d87f7040f
commit
b611de9429
@@ -229,7 +229,7 @@ class BBCooker:
|
||||
|
||||
def setFeatures(self, features):
|
||||
# we only accept a new feature set if we're in state initial, so we can reset without problems
|
||||
if self.state != state.initial and self.state != state.error:
|
||||
if not self.state in [state.initial, state.shutdown, state.forceshutdown, state.stopped, state.error]:
|
||||
raise Exception("Illegal state for feature set change")
|
||||
original_featureset = list(self.featureset)
|
||||
for feature in features:
|
||||
@@ -1303,8 +1303,8 @@ class BBCooker:
|
||||
return False
|
||||
|
||||
if not retval:
|
||||
bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, item, failures), self.expanded_data)
|
||||
self.command.finishAsyncCommand(msg)
|
||||
bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, item, failures), self.expanded_data)
|
||||
return False
|
||||
if retval is True:
|
||||
return True
|
||||
@@ -1336,8 +1336,8 @@ class BBCooker:
|
||||
return False
|
||||
|
||||
if not retval:
|
||||
bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, targets, failures), self.data)
|
||||
self.command.finishAsyncCommand(msg)
|
||||
bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, targets, failures), self.data)
|
||||
return False
|
||||
if retval is True:
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user