diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-09 17:56:23 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-09 22:48:56 +0100 |
commit | f183c7cfe377fa6ed2777605c3590a9dda2060df (patch) | |
tree | b00803dd7a3ca343ad01553d86b80ff2dd6945d0 /meta/classes/nativesdk.bbclass | |
parent | f6a38cd75edb46858da6950b5ec029db8a12d801 (diff) | |
download | openembedded-core-f183c7cfe377fa6ed2777605c3590a9dda2060df.tar.gz openembedded-core-f183c7cfe377fa6ed2777605c3590a9dda2060df.tar.bz2 openembedded-core-f183c7cfe377fa6ed2777605c3590a9dda2060df.tar.xz openembedded-core-f183c7cfe377fa6ed2777605c3590a9dda2060df.zip |
native/nativesdk: Clean up the depends ordering after bitbake override handling updates
This massively cleans up the dependency handling in the two classes
when interacting with BBCLASSEXTEND.
This change has a dependency on the bitbake override handling change
and also the existence of the RecipePreFinalise event.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/nativesdk.bbclass')
-rw-r--r-- | meta/classes/nativesdk.bbclass | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass index cd34a798e..644e73121 100644 --- a/meta/classes/nativesdk.bbclass +++ b/meta/classes/nativesdk.bbclass @@ -54,12 +54,15 @@ FILES_${PN}-dbg += "${prefix}/.debug \ export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig" export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" -ORIG_DEPENDS := "${DEPENDS}" -DEPENDS_virtclass-nativesdk ?= "${ORIG_DEPENDS}" +python nativesdk_virtclass_handler () { + if not isinstance(e, bb.event.RecipePreFinalise): + return -python __anonymous () { - pn = bb.data.getVar("PN", d, True) - depends = bb.data.getVar("DEPENDS_virtclass-nativesdk", d, True) + pn = bb.data.getVar("PN", e.data, True) + if not pn.endswith("-nativesdk"): + return + + depends = bb.data.getVar("DEPENDS", e.data, True) deps = bb.utils.explode_deps(depends) newdeps = [] for dep in deps: @@ -71,16 +74,18 @@ python __anonymous () { newdeps.append(dep + "-nativesdk") else: newdeps.append(dep) - bb.data.setVar("DEPENDS_virtclass-nativesdk", " ".join(newdeps), d) - provides = bb.data.getVar("PROVIDES", d, True) + bb.data.setVar("DEPENDS", " ".join(newdeps), e.data) + provides = bb.data.getVar("PROVIDES", e.data, True) for prov in provides.split(): if prov.find(pn) != -1: continue if not prov.endswith("-nativesdk"): provides = provides.replace(prov, prov + "-nativesdk") - bb.data.setVar("PROVIDES", provides, d) - bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", d, False) + ":virtclass-nativesdk", d) + bb.data.setVar("PROVIDES", provides, e.data) + bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", e.data, False) + ":virtclass-nativesdk", e.data) } +addhandler nativesdk_virtclass_handler + do_populate_sysroot[stamp-extra-info] = "" do_package[stamp-extra-info] = "" |