summaryrefslogtreecommitdiffstats
path: root/meta/classes/license.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r--meta/classes/license.bbclass14
1 files changed, 10 insertions, 4 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index f075f59340..16cadf9e2c 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -16,10 +16,16 @@ addtask populate_lic after do_patch before do_build
16do_populate_lic[dirs] = "${LICSSTATEDIR}/${PN}" 16do_populate_lic[dirs] = "${LICSSTATEDIR}/${PN}"
17do_populate_lic[cleandirs] = "${LICSSTATEDIR}" 17do_populate_lic[cleandirs] = "${LICSSTATEDIR}"
18 18
19license_create_manifest() { 19python write_package_manifest() {
20 mkdir -p ${LICENSE_DIRECTORY}/${IMAGE_NAME}
21 # Get list of installed packages 20 # Get list of installed packages
22 list_installed_packages |sort > ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest 21 license_image_dir = d.expand('${LICENSE_DIRECTORY}/${IMAGE_NAME}')
22 bb.utils.mkdirhier(license_image_dir)
23 from oe.rootfs import list_installed_packages
24 open(os.path.join(license_image_dir, 'package.manifest'),
25 'w+').write(list_installed_packages(d))
26}
27
28license_create_manifest() {
23 INSTALLED_PKGS=`cat ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest` 29 INSTALLED_PKGS=`cat ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest`
24 LICENSE_MANIFEST="${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest" 30 LICENSE_MANIFEST="${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest"
25 # remove existing license.manifest file 31 # remove existing license.manifest file
@@ -354,7 +360,7 @@ SSTATETASKS += "do_populate_lic"
354do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}" 360do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}"
355do_populate_lic[sstate-outputdirs] = "${LICENSE_DIRECTORY}/" 361do_populate_lic[sstate-outputdirs] = "${LICENSE_DIRECTORY}/"
356 362
357ROOTFS_POSTPROCESS_COMMAND_prepend = "license_create_manifest; " 363ROOTFS_POSTPROCESS_COMMAND_prepend = "write_package_manifest; license_create_manifest; "
358 364
359python do_populate_lic_setscene () { 365python do_populate_lic_setscene () {
360 sstate_setscene(d) 366 sstate_setscene(d)