summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py26
1 files changed, 14 insertions, 12 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 30c9b92395..71b2ff508a 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -678,20 +678,18 @@ class BuildInfoHelper(object):
678 678
679 679
680 def store_tasks_stats(self, event): 680 def store_tasks_stats(self, event):
681 for (taskfile, taskname, taskstats) in event.data: 681 for (taskfile, taskname, taskstats, recipename) in event.data:
682 localfilepath = taskfile.split(":")[-1] 682 localfilepath = taskfile.split(":")[-1]
683 assert localfilepath.startswith("/") 683 assert localfilepath.startswith("/")
684 684
685 recipe_information = self._get_recipe_information_from_taskfile(taskfile) 685 recipe_information = self._get_recipe_information_from_taskfile(taskfile)
686 try: 686 recipe_object = Recipe.objects.get(layer_version = recipe_information['layer_version'],
687 recipe = self.orm_wrapper.get_update_recipe_object(recipe_information, True) 687 file_path__endswith = recipe_information['file_path'],
688 except NotExisting: 688 name = recipename)
689 recipe = Recipe.objects.get(layer_version = recipe_information['layer_version'],
690 file_path__endswith = recipe_information['file_path'])
691 689
692 task_information = {} 690 task_information = {}
693 task_information['build'] = self.internal_state['build'] 691 task_information['build'] = self.internal_state['build']
694 task_information['recipe'] = recipe 692 task_information['recipe'] = recipe_object
695 task_information['task_name'] = taskname 693 task_information['task_name'] = taskname
696 task_information['cpu_usage'] = taskstats['cpu_usage'] 694 task_information['cpu_usage'] = taskstats['cpu_usage']
697 task_information['disk_io'] = taskstats['disk_io'] 695 task_information['disk_io'] = taskstats['disk_io']
@@ -756,11 +754,15 @@ class BuildInfoHelper(object):
756 # for all image targets 754 # for all image targets
757 for target in self.internal_state['targets']: 755 for target in self.internal_state['targets']:
758 if target.is_image: 756 if target.is_image:
759 pkgdata = event.data['pkgdata'] 757 try:
760 imgdata = event.data['imgdata'][target.target] 758 pkgdata = event.data['pkgdata']
761 self.orm_wrapper.save_target_package_information(self.internal_state['build'], target, imgdata, pkgdata, self.internal_state['recipes']) 759 imgdata = event.data['imgdata'][target.target]
762 filedata = event.data['filedata'][target.target] 760 self.orm_wrapper.save_target_package_information(self.internal_state['build'], target, imgdata, pkgdata, self.internal_state['recipes'])
763 self.orm_wrapper.save_target_file_information(self.internal_state['build'], target, filedata) 761 filedata = event.data['filedata'][target.target]
762 self.orm_wrapper.save_target_file_information(self.internal_state['build'], target, filedata)
763 except KeyError:
764 # we must have not got the data for this image, nothing to save
765 pass
764 766
765 767
766 768