summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/buildinfohelper.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/ui/buildinfohelper.py')
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py22
1 files changed, 13 insertions, 9 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):