summaryrefslogtreecommitdiffstats
path: root/meta/classes/native.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/native.bbclass')
-rw-r--r--meta/classes/native.bbclass16
1 files changed, 11 insertions, 5 deletions
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 6bd37697d0..2bd0cf3dfe 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -91,6 +91,9 @@ python __anonymous () {
91 pn = bb.data.getVar("PN", d, True) 91 pn = bb.data.getVar("PN", d, True)
92 depends = bb.data.getVar("DEPENDS", d, True) 92 depends = bb.data.getVar("DEPENDS", d, True)
93 deps = bb.utils.explode_deps(depends) 93 deps = bb.utils.explode_deps(depends)
94 depends = bb.data.getVar("DEPENDS", d, True)
95 deps = bb.utils.explode_deps(depends)
96 newdeps = []
94 if "native" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""): 97 if "native" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""):
95 autoextend = True 98 autoextend = True
96 else: 99 else:
@@ -98,16 +101,19 @@ python __anonymous () {
98 for dep in deps: 101 for dep in deps:
99 if dep.endswith("-cross"): 102 if dep.endswith("-cross"):
100 if autoextend: 103 if autoextend:
101 depends = depends.replace(dep, dep.replace("-cross", "-native")) 104 newdeps.append(dep.replace("-cross", "-native"))
102 else: 105 else:
103 bb.note("%s has depends %s which ends in -cross?" % (pn, dep)) 106 bb.note("%s has depends %s which ends in -cross?" % (pn, dep))
104 107 newdeps.append(dep)
105 if not dep.endswith("-native"): 108 elif not dep.endswith("-native"):
106 if autoextend: 109 if autoextend:
107 depends = depends.replace(dep, dep + "-native") 110 newdeps.append(dep + "-native")
108 else: 111 else:
109 bb.note("%s has depends %s which doesn't end in -native?" % (pn, dep)) 112 bb.note("%s has depends %s which doesn't end in -native?" % (pn, dep))
110 bb.data.setVar("DEPENDS", depends, d) 113 newdeps.append(dep)
114 else:
115 newdeps.append(dep)
116 bb.data.setVar("DEPENDS", " ".join(newdeps), d)
111 provides = bb.data.getVar("PROVIDES", d, True) 117 provides = bb.data.getVar("PROVIDES", d, True)
112 for prov in provides.split(): 118 for prov in provides.split():
113 if prov.find(pn) != -1: 119 if prov.find(pn) != -1: