aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorCristiana Voicu <cristiana.voicu@intel.com>2014-03-12 18:47:40 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-14 07:16:28 -0700
commit911b5191133956c30d53f57629c115db196b9ac8 (patch)
tree851f6d75e72be0b66e371b5fe79902a4bea9f04b /lib
parenta0b06d362b9aa08fda293489467af343c6ca6de4 (diff)
downloadbitbake-911b5191133956c30d53f57629c115db196b9ac8.tar.gz
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] Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/bb/ui/buildinfohelper.py14
-rw-r--r--lib/bb/ui/toasterui.py8
2 files changed, 19 insertions, 3 deletions
diff --git a/lib/bb/ui/buildinfohelper.py b/lib/bb/ui/buildinfohelper.py
index 1b17c1f6e..8f091e899 100644
--- a/lib/bb/ui/buildinfohelper.py
+++ b/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)
diff --git a/lib/bb/ui/toasterui.py b/lib/bb/ui/toasterui.py
index 04e0f9934..b2c084cb8 100644
--- a/lib/bb/ui/toasterui.py
+++ b/lib/bb/ui/toasterui.py
@@ -235,14 +235,16 @@ def main(server, eventHandler, params ):
if isinstance(event, bb.event.MetadataEvent):
if event.type == "SinglePackageInfo":
buildinfohelper.store_build_package_information(event)
- if event.type == "LayerInfo":
+ elif event.type == "LayerInfo":
buildinfohelper.store_layer_info(event)
- if event.type == "BuildStatsList":
+ elif event.type == "BuildStatsList":
buildinfohelper.store_tasks_stats(event)
- if event.type == "ImagePkgList":
+ elif event.type == "ImagePkgList":
buildinfohelper.store_target_package_data(event)
elif event.type == "ImageFileSize":
buildinfohelper.update_target_image_file(event)
+ elif event.type == "LicenseManifestPath":
+ buildinfohelper.store_license_manifest_path(event)
continue
# ignore