diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-05 20:05:45 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-13 12:15:27 +0000 |
commit | b26b8f4f23f638651886cd29e969cdefb591eb74 (patch) | |
tree | 78b63ac502c5a85c88712491b7043a5d42d93c2b /meta/classes/native.bbclass | |
parent | abe3902c2c36d93f2e3f6e2dd4b33119058b584e (diff) | |
download | openembedded-core-b26b8f4f23f638651886cd29e969cdefb591eb74.tar.gz openembedded-core-b26b8f4f23f638651886cd29e969cdefb591eb74.tar.bz2 openembedded-core-b26b8f4f23f638651886cd29e969cdefb591eb74.tar.xz openembedded-core-b26b8f4f23f638651886cd29e969cdefb591eb74.zip |
native.bbclass: Improve DEPENDS mangling code so sub matches don't break upon substitutions
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes/native.bbclass')
-rw-r--r-- | meta/classes/native.bbclass | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass index 6bd37697d..2bd0cf3df 100644 --- a/meta/classes/native.bbclass +++ b/meta/classes/native.bbclass @@ -91,6 +91,9 @@ python __anonymous () { pn = bb.data.getVar("PN", d, True) depends = bb.data.getVar("DEPENDS", d, True) deps = bb.utils.explode_deps(depends) + depends = bb.data.getVar("DEPENDS", d, True) + deps = bb.utils.explode_deps(depends) + newdeps = [] if "native" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""): autoextend = True else: @@ -98,16 +101,19 @@ python __anonymous () { for dep in deps: if dep.endswith("-cross"): if autoextend: - depends = depends.replace(dep, dep.replace("-cross", "-native")) + newdeps.append(dep.replace("-cross", "-native")) else: bb.note("%s has depends %s which ends in -cross?" % (pn, dep)) - - if not dep.endswith("-native"): + newdeps.append(dep) + elif not dep.endswith("-native"): if autoextend: - depends = depends.replace(dep, dep + "-native") + newdeps.append(dep + "-native") else: bb.note("%s has depends %s which doesn't end in -native?" % (pn, dep)) - bb.data.setVar("DEPENDS", depends, d) + newdeps.append(dep) + 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: |