summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-11-05 20:05:45 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-11-13 12:15:27 +0000
commitb26b8f4f23f638651886cd29e969cdefb591eb74 (patch)
tree78b63ac502c5a85c88712491b7043a5d42d93c2b
parentabe3902c2c36d93f2e3f6e2dd4b33119058b584e (diff)
downloadpoky-b26b8f4f23f638651886cd29e969cdefb591eb74.tar.gz
native.bbclass: Improve DEPENDS mangling code so sub matches don't break upon substitutions
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-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: