[OE-core] [PATCH 2/3] populate_sdk_base.bbclass: help rpm to pull in multilib toolchain
Robert Yang
liezhi.yang at windriver.com
Thu Aug 13 07:37:20 UTC 2015
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.
[YOCTO #8089]
Signed-off-by: Robert Yang <liezhi.yang at 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
More information about the Openembedded-core
mailing list