summaryrefslogtreecommitdiffstats
path: root/lib/bb/event.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-08-26 13:50:47 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-29 13:56:53 +0100
commitdf2b778efd2ecc48f6c5a3ed446f6459f2250035 (patch)
tree1cf8328863f1cf3a75e46a64f97803e77b7e16c1 /lib/bb/event.py
parent6db00cace690f39ace3a0556db7b5d4e2911d5d7 (diff)
downloadbitbake-contrib-df2b778efd2ecc48f6c5a3ed446f6459f2250035.tar.gz
lib/bb/cooker: add interrupted flag to BuildCompleted event
Allow any listeners for this event (such as buildhistory.bbclass in OpenEmbedded) to find out if the build was interrupted rather than completing normally. The value will be 0 if not interrupted, 1 if interrupted waiting for remaining tasks to complete, or 2 if force interrupted (stopping any running tasks immediately). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/event.py')
-rw-r--r--lib/bb/event.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bb/event.py b/lib/bb/event.py
index 0e181102c..3f96bcab3 100644
--- a/lib/bb/event.py
+++ b/lib/bb/event.py
@@ -370,11 +370,12 @@ class BuildStarted(BuildBase, OperationStarted):
class BuildCompleted(BuildBase, OperationCompleted):
"""bbmake build run completed"""
- def __init__(self, total, n, p, failures = 0):
+ def __init__(self, total, n, p, failures=0, interrupted=0):
if not failures:
OperationCompleted.__init__(self, total, "Building Succeeded")
else:
OperationCompleted.__init__(self, total, "Building Failed")
+ self._interrupted = interrupted
BuildBase.__init__(self, n, p, failures)
class DiskFull(Event):