From 8044fc3347d799960951ea562391de27fa1b1384 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 28 Nov 2010 15:20:33 +0000 Subject: native.bbclasS: Add handing to remap RDEPENDS fields and avoid crossed target and native dependency trees Signed-off-by: Richard Purdie --- meta/classes/native.bbclass | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'meta/classes/native.bbclass') diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass index 472f0b6cad..067b1be13c 100644 --- a/meta/classes/native.bbclass +++ b/meta/classes/native.bbclass @@ -71,8 +71,10 @@ PKG_CONFIG_PATH .= "${EXTRA_NATIVE_PKGCONFIG_PATH}" PKG_CONFIG_SYSROOT_DIR = "" ORIG_DEPENDS := "${DEPENDS}" +ORIG_RDEPENDS := "${RDEPENDS}" DEPENDS_virtclass-native ?= "${ORIG_DEPENDS}" +RDEPENDS_virtclass-native ?= "${ORIG_RDEPENDS}" python __anonymous () { if "native" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""): @@ -84,11 +86,21 @@ python __anonymous () { if dep.endswith("-cross"): newdeps.append(dep.replace("-cross", "-native")) elif not dep.endswith("-native"): - newdeps.append(dep + "-native") else: newdeps.append(dep) bb.data.setVar("DEPENDS_virtclass-native", " ".join(newdeps), d) + rdepends = bb.data.getVar("RDEPENDS_virtclass-native", d, True) + rdeps = bb.utils.explode_deps(rdepends) + newdeps = [] + for dep in rdeps: + if dep.endswith("-cross"): + newdeps.append(dep.replace("-cross", "-native")) + elif not dep.endswith("-native"): + newdeps.append(dep + "-native") + else: + newdeps.append(dep) + bb.data.setVar("RDEPENDS_virtclass-native", " ".join(newdeps), d) provides = bb.data.getVar("PROVIDES", d, True) for prov in provides.split(): if prov.find(pn) != -1: -- cgit v1.2.3