summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/cooker.py10
-rw-r--r--bitbake/lib/bb/event.py3
2 files changed, 10 insertions, 3 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:
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py
index 0e181102c6..3f96bcab32 100644
--- a/bitbake/lib/bb/event.py
+++ b/bitbake/lib/bb/event.py
@@ -370,11 +370,12 @@ class BuildStarted(BuildBase, OperationStarted):
370 370
371class BuildCompleted(BuildBase, OperationCompleted): 371class BuildCompleted(BuildBase, OperationCompleted):
372 """bbmake build run completed""" 372 """bbmake build run completed"""
373 def __init__(self, total, n, p, failures = 0): 373 def __init__(self, total, n, p, failures=0, interrupted=0):
374 if not failures: 374 if not failures:
375 OperationCompleted.__init__(self, total, "Building Succeeded") 375 OperationCompleted.__init__(self, total, "Building Succeeded")
376 else: 376 else:
377 OperationCompleted.__init__(self, total, "Building Failed") 377 OperationCompleted.__init__(self, total, "Building Failed")
378 self._interrupted = interrupted
378 BuildBase.__init__(self, n, p, failures) 379 BuildBase.__init__(self, n, p, failures)
379 380
380class DiskFull(Event): 381class DiskFull(Event):