[oe-commits] [bitbake] 01/02: toaster: handle early exceptions
git at git.openembedded.org
git at git.openembedded.org
Mon Sep 11 10:03:56 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository bitbake.
commit 2cd664097c29ad07b08c82d07a239ca199abbc9a
Author: David Reyna <David.Reyna at windriver.com>
AuthorDate: Thu Sep 7 21:50:47 2017 -0700
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]
Signed-off-by: David Reyna <David.Reyna at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/toaster/bldcontrol/management/commands/runbuilds.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/toaster/bldcontrol/management/commands/runbuilds.py b/lib/toaster/bldcontrol/management/commands/runbuilds.py
index 8eacb5e..791e53e 100644
--- a/lib/toaster/bldcontrol/management/commands/runbuilds.py
+++ b/lib/toaster/bldcontrol/management/commands/runbuilds.py
@@ -79,6 +79,14 @@ class Command(BaseCommand):
br.save()
bec.be.lock = BuildEnvironment.LOCK_FREE
bec.be.save()
+ # Cancel the pending build and report the exception to the UI
+ log_object = LogMessage.objects.create(
+ build = br.build,
+ level = LogMessage.EXCEPTION,
+ message = errmsg)
+ log_object.save()
+ br.build.outcome = Build.FAILED
+ br.build.save()
def archive(self):
for br in BuildRequest.objects.filter(state=BuildRequest.REQ_ARCHIVE):
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list