summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-03-06 15:37:25 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-09 14:33:46 +0000
commitb611de9429d94a113cc08103c86877e103ea8de4 (patch)
treeecf967ec92855599a485e999c414ab31a37fe338 /bitbake
parent8d87f7040fc25a52d6a2c4822b46799f5ab2c481 (diff)
downloadpoky-b611de9429d94a113cc08103c86877e103ea8de4.tar.gz
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>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cooker.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 5ebf6a1328..57fb58157e 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -229,7 +229,7 @@ class BBCooker:
229 229
230 def setFeatures(self, features): 230 def setFeatures(self, features):
231 # we only accept a new feature set if we're in state initial, so we can reset without problems 231 # we only accept a new feature set if we're in state initial, so we can reset without problems
232 if self.state != state.initial and self.state != state.error: 232 if not self.state in [state.initial, state.shutdown, state.forceshutdown, state.stopped, state.error]:
233 raise Exception("Illegal state for feature set change") 233 raise Exception("Illegal state for feature set change")
234 original_featureset = list(self.featureset) 234 original_featureset = list(self.featureset)
235 for feature in features: 235 for feature in features:
@@ -1303,8 +1303,8 @@ class BBCooker:
1303 return False 1303 return False
1304 1304
1305 if not retval: 1305 if not retval:
1306 bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, item, failures), self.expanded_data)
1307 self.command.finishAsyncCommand(msg) 1306 self.command.finishAsyncCommand(msg)
1307 bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, item, failures), self.expanded_data)
1308 return False 1308 return False
1309 if retval is True: 1309 if retval is True:
1310 return True 1310 return True
@@ -1336,8 +1336,8 @@ class BBCooker:
1336 return False 1336 return False
1337 1337
1338 if not retval: 1338 if not retval:
1339 bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, targets, failures), self.data)
1340 self.command.finishAsyncCommand(msg) 1339 self.command.finishAsyncCommand(msg)
1340 bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, targets, failures), self.data)
1341 return False 1341 return False
1342 if retval is True: 1342 if retval is True:
1343 return True 1343 return True