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):
67 67
68 if brbe is not None: 68 if brbe is not None:
69 from bldcontrol.models import BuildEnvironment, BuildRequest 69 from bldcontrol.models import BuildEnvironment, BuildRequest
70 br, be = brbe.split(":") 70 try:
71 buildrequest = BuildRequest.objects.get(pk = br) 71 br, be = brbe.split(":")
72 buildrequest.build = build 72 buildrequest = BuildRequest.objects.get(pk = br)
73 buildrequest.save() 73 buildrequest.build = build
74 build.project_id = buildrequest.project_id 74 buildrequest.save()
75 build.save() 75 build.project_id = buildrequest.project_id
76 76 build.save()
77 except BuildRequest.DoesNotExist:
78 pass
77 return build 79 return build
78 80
79 def create_target_objects(self, target_info): 81 def create_target_objects(self, target_info):
@@ -146,6 +148,8 @@ class ORMWrapper(object):
146 if 'start_time' in task_information.keys() and 'end_time' in task_information.keys(): 148 if 'start_time' in task_information.keys() and 'end_time' in task_information.keys():
147 duration = task_information['end_time'] - task_information['start_time'] 149 duration = task_information['end_time'] - task_information['start_time']
148 task_object.elapsed_time = duration 150 task_object.elapsed_time = duration
151 del task_information['start_time']
152 del task_information['end_time']
149 153
150 task_object.save() 154 task_object.save()
151 return task_object 155 return task_object
@@ -320,8 +324,7 @@ class ORMWrapper(object):
320 searchname = pkgpnmap[p]['OPKGN'] 324 searchname = pkgpnmap[p]['OPKGN']
321 325
322 packagedict[p]['object'], created = Package.objects.get_or_create( build = build_obj, name = searchname ) 326 packagedict[p]['object'], created = Package.objects.get_or_create( build = build_obj, name = searchname )
323 if created: 327 if True: # save the data anyway we can, not just if it was not created here; bug [YOCTO #6887]
324 # package was not build in the current build, but
325 # fill in everything we can from the runtime-reverse package data 328 # fill in everything we can from the runtime-reverse package data
326 try: 329 try:
327 packagedict[p]['object'].recipe = recipes[pkgpnmap[p]['PN']] 330 packagedict[p]['object'].recipe = recipes[pkgpnmap[p]['PN']]
@@ -717,6 +720,7 @@ class BuildInfoHelper(object):
717 task_information['task_name'] = taskname 720 task_information['task_name'] = taskname
718 task_information['cpu_usage'] = taskstats['cpu_usage'] 721 task_information['cpu_usage'] = taskstats['cpu_usage']
719 task_information['disk_io'] = taskstats['disk_io'] 722 task_information['disk_io'] = taskstats['disk_io']
723 task_information['elapsed_time'] = taskstats['elapsed_time']
720 task_obj = self.orm_wrapper.get_update_task_object(task_information, True) # must exist 724 task_obj = self.orm_wrapper.get_update_task_object(task_information, True) # must exist
721 725
722 def update_and_store_task(self, event): 726 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 ):
231 231
232 buildinfohelper.update_build_information(event, errors, warnings, taskfailures) 232 buildinfohelper.update_build_information(event, errors, warnings, taskfailures)
233 buildinfohelper.close(errorcode) 233 buildinfohelper.close(errorcode)
234 # mark the log output; controllers may kill the toasterUI after seeing this log
235 logger.info("ToasterUI build done")
234 236
235 # we start a new build info 237 # we start a new build info
236 if buildinfohelper.brbe is not None: 238 if buildinfohelper.brbe is not None:
237 239
238 print "we are under BuildEnvironment management - after the build, we exit" 240 logger.debug(1, "ToasterUI under BuildEnvironment management - exiting after the build")
239 server.terminateServer() 241 server.terminateServer()
240 else: 242 else:
241 print "prepared for new build" 243 logger.debug(1, "ToasterUI prepared for new build")
242 errors = 0 244 errors = 0
243 warnings = 0 245 warnings = 0
244 taskfailures = [] 246 taskfailures = []