From 5396191fed7921c6d0762ba71f182ce2d0174686 Mon Sep 17 00:00:00 2001 From: Cristiana Voicu Date: Wed, 12 Mar 2014 18:47:40 +0000 Subject: bitbake: toaster: add license manifest path to database Based on image_name, the target is obtained, and the path is added to the database. [YOCTO #5649] (Bitbake rev: 911b5191133956c30d53f57629c115db196b9ac8) Signed-off-by: Cristiana Voicu Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/buildinfohelper.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'bitbake/lib/bb/ui/buildinfohelper.py') diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py index 1b17c1f6e3..8f091e8990 100644 --- a/bitbake/lib/bb/ui/buildinfohelper.py +++ b/bitbake/lib/bb/ui/buildinfohelper.py @@ -93,6 +93,10 @@ class ORMWrapper(object): build.outcome = outcome build.save() + def update_target_object(self, target, license_manifest_path): + + target.license_manifest_path = license_manifest_path + target.save() def get_update_task_object(self, task_information, must_exist = False): assert 'build' in task_information @@ -616,6 +620,16 @@ class BuildInfoHelper(object): if 'build' in self.internal_state: self.orm_wrapper.update_build_object(self.internal_state['build'], errors, warnings, taskfailures) + + def store_license_manifest_path(self, event): + deploy_dir = event.data['deploy_dir_image'] + image_name = event.data['image_name'] + path = deploy_dir + "/licenses/" + image_name + "/" + for target in self.internal_state['targets']: + if target.target in image_name: + self.orm_wrapper.update_target_object(target, path) + + def store_started_task(self, event): assert isinstance(event, (bb.runqueue.sceneQueueTaskStarted, bb.runqueue.runQueueTaskStarted, bb.runqueue.runQueueTaskSkipped)) assert 'taskfile' in vars(event) -- cgit v1.2.3-54-g00ecf