[OE-core] [PATCH 3/3] classes/populate_sdk_base: Adds support to generate extensible sdk package manifest

Francisco Pedraza francisco.j.pedraza.gonzalez at intel.com
Tue Feb 21 22:48:51 UTC 2017


This function writes on host and target manifest files for eSDK.
[YOCTO #9038]

Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez at intel.com>
---
 meta/classes/populate_sdk_base.bbclass | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 33665cd..db700d7 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -59,6 +59,9 @@ SDK_TITLE ?= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK"
 
 SDK_TARGET_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
 SDK_HOST_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
+SDK_EXT_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.target.manifest"
+SDK_EXT_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest"
+
 python write_target_sdk_manifest () {
     if d.getVar('BB_CURRENTTASK') == 'populate_sdk':
         from oe.sdk import sdk_list_installed_packages
@@ -69,6 +72,17 @@ python write_target_sdk_manifest () {
             bb.utils.mkdirhier(sdkmanifestdir)
         with open(d.getVar('SDK_TARGET_MANIFEST'), 'w') as output:
             output.write(format_pkg_list(pkgs, 'ver'))
+    elif d.getVar('BB_CURRENTTASK') == 'populate_sdk_ext':
+        from oe.sdk import get_extra_sdkinfo
+        sstate_dir = d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache')
+        extra_info = get_extra_sdkinfo(sstate_dir)
+        target = d.getVar('TARGET_SYS')
+        target_multimach = d.getVar('MULTIMACH_TARGET_SYS')
+        with open(d.getVar('SDK_EXT_TARGET_MANIFEST'), 'w') as f:
+            for fn in extra_info['filesizes']:
+                info = fn.split(':') #added
+                if info[2] in (target, target_multimach):
+                    f.write("%s %s %s\n" % (info[1], info[2], info[3]))
 }
 
 python write_sdk_test_data() {
@@ -88,12 +102,22 @@ python write_host_sdk_manifest () {
             bb.utils.mkdirhier(sdkmanifestdir)
         with open(d.getVar('SDK_HOST_MANIFEST'), 'w') as output:
             output.write(format_pkg_list(pkgs, 'ver'))
+    elif d.getVar('BB_CURRENTTASK') == 'populate_sdk_ext':
+        from oe.sdk import get_extra_sdkinfo
+        sstate_dir = d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache')
+        extra_info = get_extra_sdkinfo(sstate_dir)
+        host = d.getVar('BUILD_SYS')
+        with open(d.getVar('SDK_EXT_HOST_MANIFEST'), 'w') as f:
+            for fn in extra_info['filesizes']:
+                info = fn.split(':') #added
+                if info[2] == host:
+                    f.write("%s %s %s\n" % (info[1], info[2], info[3]))
 }
 
 POPULATE_SDK_POST_TARGET_COMMAND_append = " write_target_sdk_manifest ; write_sdk_test_data ; "
 POPULATE_SDK_POST_HOST_COMMAND_append = " write_host_sdk_manifest; "
 SDK_PACKAGING_COMMAND = "${@'${SDK_PACKAGING_FUNC};' if '${SDK_PACKAGING_FUNC}' else ''}"
-SDK_POSTPROCESS_COMMAND = " create_sdk_files; check_sdk_sysroots; tar_sdk; ${SDK_PACKAGING_COMMAND} "
+SDK_POSTPROCESS_COMMAND = " create_sdk_files; check_sdk_sysroots; tar_sdk; write_target_sdk_manifest; write_host_sdk_manifest; ${SDK_PACKAGING_COMMAND} "
 
 def populate_sdk_common(d):
     from oe.sdk import populate_sdk
-- 
1.8.3.1




More information about the Openembedded-core mailing list