From: Robert Yang <liezhi.yang@windriver.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
Mark Hatle <mark.hatle@windriver.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 2/3] populate_sdk_base.bbclass: help rpm to pull in multilib toolchain
Date: Mon, 17 Aug 2015 10:27:11 +0800 [thread overview]
Message-ID: <55D1467F.6090807@windriver.com> (raw)
In-Reply-To: <1439628950.1218.16.camel@linuxfoundation.org>
On 08/15/2015 04:55 PM, Richard Purdie wrote:
> On Thu, 2015-08-13 at 00:37 -0700, Robert Yang wrote:
>> When configure multilib, "bitbake <image_bb> -c populate_sdk" should
>> install all arch toolchains (for example, 32 and 64bit), but rpm not
>> handle the multilib requires correctly, for example:
>> lib32-packagegroup-core-standalone-sdk-target requires lib32-libc6, rpm
>> may pull in libc6 rather than lib32-libc6, if we directly use something
>> like IMAGE_INSTALL_append = " lib32-libc6", then it works well, so
>> update TOOLCHAIN_TARGET_TASK to include the RDEPENDS packages will fix
>> the issue.
>
> Whilst I understand why you're doing this, its rather sad that as the
> rpm multilib code is broken, we have to hack the core sdk code like this
> to work around it.
>
> Could/should we not put this into the rpm sdk backend instead?
Sorry, I can't understand what did you mean, do you mean put this into rpm
sdk backend such as meta/lib/oe/sdk.py ?
// Robert
>
> I also can't help this is just a bandaid and that we'll likely find
> other ways this breaks in the future, its not a complete solution to the
> issue :/.
>
> Cheers,
>
> Richard
>
>> [YOCTO #8089]
>>
>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>> ---
>> meta/classes/populate_sdk_base.bbclass | 32 ++++++++++++++++++++++++++++++++
>> 1 file changed, 32 insertions(+)
>>
>> diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
>> index a9e9bd7..c2491ea 100644
>> --- a/meta/classes/populate_sdk_base.bbclass
>> +++ b/meta/classes/populate_sdk_base.bbclass
>> @@ -83,8 +83,40 @@ POPULATE_SDK_POST_HOST_COMMAND_append = " write_host_sdk_manifest; "
>> fakeroot python do_populate_sdk() {
>> from oe.sdk import populate_sdk
>> from oe.manifest import create_manifest, Manifest
>> + import oe.packagedata
>>
>> pn = d.getVar('PN', True)
>> + # Help rpm to pull in multilib requires since it may not pull in
>> + # them correctly, for example,
>> + # lib32-packagegroup-core-standalone-sdk-target requires
>> + # lib32-libc6, rpm may pull in libc6 rather than lib32-libc6, but
>> + # directly use
>> + # TOOLCHAIN_TARGET_TASK_append = " lib32-libc6" works well.
>> + for pkg in (d.getVar('TOOLCHAIN_TARGET_TASK', True) or "").split():
>> + sub_data = oe.packagedata.read_subpkgdata(pkg, d)
>> + sub_rdep = sub_data.get("RDEPENDS_" + pkg)
>> + if not sub_rdep:
>> + continue
>> + done = sub_rdep.split()
>> + next = done
>> + # Find all the rdepends on the dependency chain
>> + while next:
>> + new = []
>> + for sub_pkg in next:
>> + sub_data = oe.packagedata.read_subpkgdata(sub_pkg, d)
>> + sub_pkg_rdep = sub_data.get("RDEPENDS_" + sub_pkg)
>> + if not sub_pkg_rdep:
>> + continue
>> + for p in sub_pkg_rdep.split():
>> + if p in done:
>> + continue
>> + if not p.startswith('(') and \
>> + oe.packagedata.has_subpkgdata(p, d):
>> + # It's a new rdep
>> + done.append(p)
>> + new.append(p)
>> + next = new
>> + d.appendVar('TOOLCHAIN_TARGET_TASK', ' ' + " ".join(done))
>> runtime_mapping_rename("TOOLCHAIN_TARGET_TASK", pn, d)
>> runtime_mapping_rename("TOOLCHAIN_TARGET_TASK_ATTEMPTONLY", pn, d)
>>
>> --
>> 1.7.9.5
>>
>
>
>
>
next prev parent reply other threads:[~2015-08-17 2:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-13 7:37 [PATCH 0/3] populate_sdk_base.bbclass: fixes for multilib sdk Robert Yang
2015-08-13 7:37 ` [PATCH 1/3] toolchain-shar-extract.sh: add a space in the end Robert Yang
2015-08-15 1:23 ` Randy MacLeod
2015-08-17 2:27 ` Robert Yang
2015-08-13 7:37 ` [PATCH 2/3] populate_sdk_base.bbclass: help rpm to pull in multilib toolchain Robert Yang
2015-08-15 8:55 ` Richard Purdie
2015-08-17 2:27 ` Robert Yang [this message]
2015-08-13 7:37 ` [PATCH 3/3] packagegroup-core-standalone-sdk-target: remove qemuwrapper-cross Robert Yang
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=55D1467F.6090807@windriver.com \
--to=liezhi.yang@windriver.com \
--cc=mark.hatle@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox