summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-09-17 00:16:46 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2009-09-17 22:25:22 +0100
commitbc5afa640b56b39cb53873c46dde5a7b38fb6343 (patch)
tree624608eff9b8c75a8603e162c93ecae0bcf9eae0 /meta
parent0d7207ca39d1671682f9467a804766b151048573 (diff)
downloadopenembedded-core-bc5afa640b56b39cb53873c46dde5a7b38fb6343.tar.gz
openembedded-core-bc5afa640b56b39cb53873c46dde5a7b38fb6343.tar.bz2
openembedded-core-bc5afa640b56b39cb53873c46dde5a7b38fb6343.zip
nativesdk: Don't use search and replace on DEPENDS field
Search and replace on the DEPENDS field can cause problems if multiple similar names are present in the string so use an alternative approach. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/nativesdk.bbclass16
1 files changed, 10 insertions, 6 deletions
diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass
index d1b429488b..59d3320c3c 100644
--- a/meta/classes/nativesdk.bbclass
+++ b/meta/classes/nativesdk.bbclass
@@ -75,21 +75,25 @@ python __anonymous () {
pn = bb.data.getVar("PN", d, True)
depends = bb.data.getVar("DEPENDS", d, True)
deps = bb.utils.explode_deps(depends)
- if "sdk" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""):
+ newdeps = []
+ if "nativesdk" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""):
autoextend = True
else:
autoextend = False
for dep in deps:
if dep.endswith("-native") or dep.endswith("-cross"):
- continue
- if not dep.endswith("-nativesdk"):
+ newdeps.append(dep)
+ elif not dep.endswith("-nativesdk"):
if autoextend:
- depends = depends.replace(dep, dep + "-nativesdk")
+ newdeps.append(dep + "-nativesdk")
elif pn == 'gcc-cross-nativesdk':
- continue
+ newdeps.append(dep)
else:
+ newdeps.append(dep)
bb.note("%s has depends %s which doesn't end in -nativesdk?" % (pn, dep))
- bb.data.setVar("DEPENDS", depends, d)
+ else:
+ newdeps.append(dep)
+ bb.data.setVar("DEPENDS", " ".join(newdeps), d)
provides = bb.data.getVar("PROVIDES", d, True)
for prov in provides.split():
if prov.find(pn) != -1: