aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2013-11-19 16:46:41 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-20 14:05:52 +0000
commite19ee57c962dfa7ce7802e27e16daea53f3052a3 (patch)
tree8909ca9649bd18084d130a117a7e6d0e72b756e3 /bitbake/lib/bb/cooker.py
parent10717e5a0a2918b04af04c7dca31efacd4ae8b7c (diff)
downloadopenembedded-core-contrib-e19ee57c962dfa7ce7802e27e16daea53f3052a3.tar.gz
bitbake: bitbake: cooker, toaster: mark interrupted builds as failed
This patch changes bitbake to log an error to the command line when the build is interrupted via Ctrl-C. This is needed to inform the user that not all tasks required for the build have been executed, and the build is not complete. Internally, the Bitbake server will return a CommandFailed event that will be logged by Toaster as build failure. (Bitbake rev: 9a658e8b1511f1b9f91663f546f748fdfbc8965f) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 524ba1182c..3295f6c822 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1109,10 +1109,13 @@ class BBCooker:
def buildFileIdle(server, rq, abort):
+ msg = None
if abort or self.state == state.forceshutdown:
rq.finish_runqueue(True)
+ msg = "Forced shutdown"
elif self.state == state.shutdown:
rq.finish_runqueue(False)
+ msg = "Stopped build"
failures = 0
try:
retval = rq.execute_runqueue()
@@ -1125,7 +1128,7 @@ class BBCooker:
if not retval:
bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, item, failures), self.event_data)
- self.command.finishAsyncCommand()
+ self.command.finishAsyncCommand(msg)
return False
if retval is True:
return True
@@ -1139,10 +1142,13 @@ class BBCooker:
"""
def buildTargetsIdle(server, rq, abort):
+ msg = None
if abort or self.state == state.forceshutdown:
rq.finish_runqueue(True)
+ msg = "Forced shutdown"
elif self.state == state.shutdown:
rq.finish_runqueue(False)
+ msg = "Stopped build"
failures = 0
try:
retval = rq.execute_runqueue()
@@ -1155,7 +1161,7 @@ class BBCooker:
if not retval:
bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, targets, failures), self.data)
- self.command.finishAsyncCommand()
+ self.command.finishAsyncCommand(msg)
return False
if retval is True:
return True