Patchwork [2/6] toaster.bbclass: read the data needed for license manifest path

login
register
mail settings
Submitter Alexandru DAMIAN
Date March 12, 2014, 6:30 p.m.
Message ID <1394649045-11815-1-git-send-email-alexandru.damian@intel.com>
Download mbox | patch
Permalink /patch/68533/
State Accepted
Commit 4ce36a45e2cbd1571118fc6826190eaef01468ad
Headers show

Comments

Alexandru DAMIAN - March 12, 2014, 6:30 p.m.
From: Cristiana Voicu <cristiana.voicu@intel.com>

The license.manifest file is located in DEPLOY_DIR_IMAGE/licenses/
IMAGE_NAME dir. The data needed is collected after rootfs task.

[YOCTO #5649]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
---
 meta/classes/toaster.bbclass | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Patch

diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass
index ddfceb5..563b1f7 100644
--- a/meta/classes/toaster.bbclass
+++ b/meta/classes/toaster.bbclass
@@ -296,6 +296,17 @@  python toaster_buildhistory_dump() {
 
 }
 
+# dump information related to license manifest path
+
+python toaster_licensemanifest_dump() {
+    deploy_dir_image = d.getVar('DEPLOY_DIR_IMAGE', True);
+    image_name = d.getVar('IMAGE_NAME', True);
+
+    data = { 'deploy_dir_image' : deploy_dir_image, 'image_name' : image_name }
+
+    bb.event.fire(bb.event.MetadataEvent("LicenseManifestPath", data), d)
+}
+
 # set event handlers
 addhandler toaster_layerinfo_dumpdata
 toaster_layerinfo_dumpdata[eventmask] = "bb.event.TreeDataPreparationCompleted"
@@ -308,3 +319,4 @@  toaster_buildhistory_dump[eventmask] = "bb.event.BuildCompleted"
 do_package[postfuncs] += "toaster_package_dumpdata "
 
 do_rootfs[postfuncs] += "toaster_image_dumpdata "
+do_rootfs[postfuncs] += "toaster_licensemanifest_dump "