summaryrefslogtreecommitdiff
path: root/meta/classes/native.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-11-28 15:20:33 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-11-28 13:54:32 -0800
commit8044fc3347d799960951ea562391de27fa1b1384 (patch)
treeceef9b6a90461a8a22fb6b3993ee69ab43a242c1 /meta/classes/native.bbclass
parent2bcbb2f93f18fd9a087fd24717d153d3e556bf66 (diff)
downloadopenembedded-core-8044fc3347d799960951ea562391de27fa1b1384.tar.gz
openembedded-core-8044fc3347d799960951ea562391de27fa1b1384.tar.bz2
openembedded-core-8044fc3347d799960951ea562391de27fa1b1384.zip
native.bbclasS: Add handing to remap RDEPENDS fields and avoid crossed target and native dependency trees
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes/native.bbclass')
-rw-r--r--meta/classes/native.bbclass14
1 files changed, 13 insertions, 1 deletions
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: