summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 6dc9f1981d..99c47859d9 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1319,12 +1319,15 @@ class BBCooker:
1319 def buildFileIdle(server, rq, abort): 1319 def buildFileIdle(server, rq, abort):
1320 1320
1321 msg = None 1321 msg = None
1322 interrupted = 0
1322 if abort or self.state == state.forceshutdown: 1323 if abort or self.state == state.forceshutdown:
1323 rq.finish_runqueue(True) 1324 rq.finish_runqueue(True)
1324 msg = "Forced shutdown" 1325 msg = "Forced shutdown"
1326 interrupted = 2
1325 elif self.state == state.shutdown: 1327 elif self.state == state.shutdown:
1326 rq.finish_runqueue(False) 1328 rq.finish_runqueue(False)
1327 msg = "Stopped build" 1329 msg = "Stopped build"
1330 interrupted = 1
1328 failures = 0 1331 failures = 0
1329 try: 1332 try:
1330 retval = rq.execute_runqueue() 1333 retval = rq.execute_runqueue()
@@ -1336,7 +1339,7 @@ class BBCooker:
1336 return False 1339 return False
1337 1340
1338 if not retval: 1341 if not retval:
1339 bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, item, failures), self.expanded_data) 1342 bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, item, failures, interrupted), self.expanded_data)
1340 self.command.finishAsyncCommand(msg) 1343 self.command.finishAsyncCommand(msg)
1341 return False 1344 return False
1342 if retval is True: 1345 if retval is True:
@@ -1352,12 +1355,15 @@ class BBCooker:
1352 1355
1353 def buildTargetsIdle(server, rq, abort): 1356 def buildTargetsIdle(server, rq, abort):
1354 msg = None 1357 msg = None
1358 interrupted = 0
1355 if abort or self.state == state.forceshutdown: 1359 if abort or self.state == state.forceshutdown:
1356 rq.finish_runqueue(True) 1360 rq.finish_runqueue(True)
1357 msg = "Forced shutdown" 1361 msg = "Forced shutdown"
1362 interrupted = 2
1358 elif self.state == state.shutdown: 1363 elif self.state == state.shutdown:
1359 rq.finish_runqueue(False) 1364 rq.finish_runqueue(False)
1360 msg = "Stopped build" 1365 msg = "Stopped build"
1366 interrupted = 1
1361 failures = 0 1367 failures = 0
1362 try: 1368 try:
1363 retval = rq.execute_runqueue() 1369 retval = rq.execute_runqueue()
@@ -1369,7 +1375,7 @@ class BBCooker:
1369 return False 1375 return False
1370 1376
1371 if not retval: 1377 if not retval:
1372 bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, targets, failures), self.data) 1378 bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, targets, failures, interrupted), self.data)
1373 self.command.finishAsyncCommand(msg) 1379 self.command.finishAsyncCommand(msg)
1374 return False 1380 return False
1375 if retval is True: 1381 if retval is True: