summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster
diff options
context:
space:
mode:
authorDavid Reyna <David.Reyna@windriver.com>2017-09-07 21:50:47 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-11 17:19:37 +0100
commit7dce5875eae80425d1528a914c6b1f165fbb524b (patch)
treedafc619acc4020eef9426f299eafb9396a712712 /bitbake/lib/toaster
parent96f258ba12d3184a631e846c73a23d131ebc6e7e (diff)
downloadpoky-7dce5875eae80425d1528a914c6b1f165fbb524b.tar.gz
bitbake: toaster: handle early exceptions
Stop the pending build and report to the user if there is an internal exception due to a git error, a bitbake server error, or if the server-only mode halts due to for example a user syntax error in a layer or recipe. These exceptions were not caught because they occure before the normal toastergui processing was started. [YOCTO #12056] (Bitbake rev: 2cd664097c29ad07b08c82d07a239ca199abbc9a) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster')
-rw-r--r--bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
index 8eacb5e896..791e53eabf 100644
--- a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
+++ b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
@@ -79,6 +79,14 @@ class Command(BaseCommand):
79 br.save() 79 br.save()
80 bec.be.lock = BuildEnvironment.LOCK_FREE 80 bec.be.lock = BuildEnvironment.LOCK_FREE
81 bec.be.save() 81 bec.be.save()
82 # Cancel the pending build and report the exception to the UI
83 log_object = LogMessage.objects.create(
84 build = br.build,
85 level = LogMessage.EXCEPTION,
86 message = errmsg)
87 log_object.save()
88 br.build.outcome = Build.FAILED
89 br.build.save()
82 90
83 def archive(self): 91 def archive(self):
84 for br in BuildRequest.objects.filter(state=BuildRequest.REQ_ARCHIVE): 92 for br in BuildRequest.objects.filter(state=BuildRequest.REQ_ARCHIVE):