From: Joshua Lock <joshua.g.lock@linux.intel.com>
To: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com>,
openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 3/3] classes/populate_sdk_base: Adds support to generate extensible sdk package manifest
Date: Wed, 22 Feb 2017 15:52:52 +0000 [thread overview]
Message-ID: <1487778772.4973.2.camel@linux.intel.com> (raw)
In-Reply-To: <1487717331-26684-3-git-send-email-francisco.j.pedraza.gonzalez@intel.com>
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@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?
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 prev parent reply other threads:[~2017-02-22 15:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-21 22:48 [PATCH 1/3] lib/oe/sdk: Add get_extra_sdk_info to reuse code in buildhistory Francisco Pedraza
2017-02-21 22:48 ` [PATCH 2/3] meta/classes/populate_sdk_base: Only execute write manifest when is populate_sdk Francisco Pedraza
2017-02-21 22:48 ` [PATCH 3/3] classes/populate_sdk_base: Adds support to generate extensible sdk package manifest Francisco Pedraza
2017-02-21 23:07 ` Pedraza Gonzalez, Francisco J
2017-02-22 15:52 ` Joshua Lock [this message]
2017-02-22 16:18 ` Aníbal Limón
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1487778772.4973.2.camel@linux.intel.com \
--to=joshua.g.lock@linux.intel.com \
--cc=francisco.j.pedraza.gonzalez@intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.