summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index eb0e425e2c..37a3fcb9c7 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -218,6 +218,15 @@ class ORMWrapper(object):
218 assert isinstance(errors, int) 218 assert isinstance(errors, int)
219 assert isinstance(warnings, int) 219 assert isinstance(warnings, int)
220 220
221 if build.outcome == Build.CANCELLED:
222 return
223 try:
224 if build.buildrequest.state == BuildRequest.REQ_CANCELLING:
225 return
226 except AttributeError:
227 # We may not have a buildrequest if this is a command line build
228 pass
229
221 outcome = Build.SUCCEEDED 230 outcome = Build.SUCCEEDED
222 if errors or taskfailures: 231 if errors or taskfailures:
223 outcome = Build.FAILED 232 outcome = Build.FAILED
@@ -1405,9 +1414,17 @@ class BuildInfoHelper(object):
1405 be.lock = BuildEnvironment.LOCK_LOCK 1414 be.lock = BuildEnvironment.LOCK_LOCK
1406 be.save() 1415 be.save()
1407 br = BuildRequest.objects.get(pk = br_id) 1416 br = BuildRequest.objects.get(pk = br_id)
1417
1418 # if we're 'done' because we got cancelled update the build outcome
1419 if br.state == BuildRequest.REQ_CANCELLING:
1420 logger.info("Build cancelled")
1421 br.build.outcome = Build.CANCELLED
1422 br.build.save()
1423 errorcode = 0
1424
1408 if errorcode == 0: 1425 if errorcode == 0:
1409 # request archival of the project artifacts 1426 # request archival of the project artifacts
1410 br.state = BuildRequest.REQ_ARCHIVE 1427 br.state = BuildRequest.REQ_COMPLETED
1411 else: 1428 else:
1412 br.state = BuildRequest.REQ_FAILED 1429 br.state = BuildRequest.REQ_FAILED
1413 br.save() 1430 br.save()