summaryrefslogtreecommitdiffstats
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)
downloadpoky-8044fc3347d799960951ea562391de27fa1b1384.tar.gz
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}"
71PKG_CONFIG_SYSROOT_DIR = "" 71PKG_CONFIG_SYSROOT_DIR = ""
72 72
73ORIG_DEPENDS := "${DEPENDS}" 73ORIG_DEPENDS := "${DEPENDS}"
74ORIG_RDEPENDS := "${RDEPENDS}"
74 75
75DEPENDS_virtclass-native ?= "${ORIG_DEPENDS}" 76DEPENDS_virtclass-native ?= "${ORIG_DEPENDS}"
77RDEPENDS_virtclass-native ?= "${ORIG_RDEPENDS}"
76 78
77python __anonymous () { 79python __anonymous () {
78 if "native" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""): 80 if "native" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""):
@@ -84,11 +86,21 @@ python __anonymous () {
84 if dep.endswith("-cross"): 86 if dep.endswith("-cross"):
85 newdeps.append(dep.replace("-cross", "-native")) 87 newdeps.append(dep.replace("-cross", "-native"))
86 elif not dep.endswith("-native"): 88 elif not dep.endswith("-native"):
87
88 newdeps.append(dep + "-native") 89 newdeps.append(dep + "-native")
89 else: 90 else:
90 newdeps.append(dep) 91 newdeps.append(dep)
91 bb.data.setVar("DEPENDS_virtclass-native", " ".join(newdeps), d) 92 bb.data.setVar("DEPENDS_virtclass-native", " ".join(newdeps), d)
93 rdepends = bb.data.getVar("RDEPENDS_virtclass-native", d, True)
94 rdeps = bb.utils.explode_deps(rdepends)
95 newdeps = []
96 for dep in rdeps:
97 if dep.endswith("-cross"):
98 newdeps.append(dep.replace("-cross", "-native"))
99 elif not dep.endswith("-native"):
100 newdeps.append(dep + "-native")
101 else:
102 newdeps.append(dep)
103 bb.data.setVar("RDEPENDS_virtclass-native", " ".join(newdeps), d)
92 provides = bb.data.getVar("PROVIDES", d, True) 104 provides = bb.data.getVar("PROVIDES", d, True)
93 for prov in provides.split(): 105 for prov in provides.split():
94 if prov.find(pn) != -1: 106 if prov.find(pn) != -1: