summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py22
-rw-r--r--bitbake/lib/bb/ui/toasterui.py6
2 files changed, 17 insertions, 11 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index fcef53b63d..b5ae9e97b2 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -67,13 +67,15 @@ class ORMWrapper(object):
if brbe is not None:
from bldcontrol.models import BuildEnvironment, BuildRequest
- br, be = brbe.split(":")
- buildrequest = BuildRequest.objects.get(pk = br)
- buildrequest.build = build
- buildrequest.save()
- build.project_id = buildrequest.project_id
- build.save()
-
+ try:
+ br, be = brbe.split(":")
+ buildrequest = BuildRequest.objects.get(pk = br)
+ buildrequest.build = build
+ buildrequest.save()
+ build.project_id = buildrequest.project_id
+ build.save()
+ except BuildRequest.DoesNotExist:
+ pass
return build
def create_target_objects(self, target_info):
@@ -146,6 +148,8 @@ class ORMWrapper(object):
if 'start_time' in task_information.keys() and 'end_time' in task_information.keys():
duration = task_information['end_time'] - task_information['start_time']
task_object.elapsed_time = duration
+ del task_information['start_time']
+ del task_information['end_time']
task_object.save()
return task_object
@@ -320,8 +324,7 @@ class ORMWrapper(object):
searchname = pkgpnmap[p]['OPKGN']
packagedict[p]['object'], created = Package.objects.get_or_create( build = build_obj, name = searchname )
- if created:
- # package was not build in the current build, but
+ if True: # save the data anyway we can, not just if it was not created here; bug [YOCTO #6887]
# fill in everything we can from the runtime-reverse package data
try:
packagedict[p]['object'].recipe = recipes[pkgpnmap[p]['PN']]
@@ -717,6 +720,7 @@ class BuildInfoHelper(object):
task_information['task_name'] = taskname
task_information['cpu_usage'] = taskstats['cpu_usage']
task_information['disk_io'] = taskstats['disk_io']
+ task_information['elapsed_time'] = taskstats['elapsed_time']
task_obj = self.orm_wrapper.get_update_task_object(task_information, True) # must exist
def update_and_store_task(self, event):
diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py
index 0c53843149..007c6b6114 100644
--- a/bitbake/lib/bb/ui/toasterui.py
+++ b/bitbake/lib/bb/ui/toasterui.py
@@ -231,14 +231,16 @@ def main(server, eventHandler, params ):
buildinfohelper.update_build_information(event, errors, warnings, taskfailures)
buildinfohelper.close(errorcode)
+ # mark the log output; controllers may kill the toasterUI after seeing this log
+ logger.info("ToasterUI build done")
# we start a new build info
if buildinfohelper.brbe is not None:
- print "we are under BuildEnvironment management - after the build, we exit"
+ logger.debug(1, "ToasterUI under BuildEnvironment management - exiting after the build")
server.terminateServer()
else:
- print "prepared for new build"
+ logger.debug(1, "ToasterUI prepared for new build")
errors = 0
warnings = 0
taskfailures = []