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

Aníbal Limón anibal.limon at linux.intel.com
Wed Feb 22 16:18:48 UTC 2017



On 02/22/2017 09:52 AM, Joshua Lock wrote:
> On Tue, 2017-02-21 at 14:48 -0800, Francisco Pedraza wrote:
>> 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':
> 
> Rather than checking which task is running like this couldn't we do the
> following logic in the
> populate_sdk_ext.bbclass:write_target_sdk_manifest() and similarly move
> the above into populate_sdk.bbclass?

Yes, that would be a good idea.

	alimon


> 
> Joshua
>> +        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
>>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20170222/583c48d0/attachment-0002.sig>


More information about the Openembedded-core mailing list