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:49:10 +0100 |
commit | 1b53eef2769d1b5e4ff527ccabf9b700afc02220 (patch) | |
tree | eac0ab929bf93d34cb48b1be690d9a19a37330b7 /meta/classes/nativesdk.bbclass | |
parent | 69c87c5ebba27d843e00a01d02031477f23867fe (diff) | |
download | poky-1b53eef2769d1b5e4ff527ccabf9b700afc02220.tar.gz |
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.
(From OE-Core rev: f183c7cfe377fa6ed2777605c3590a9dda2060df)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 cd34a798ef..644e73121b 100644 --- a/meta/classes/nativesdk.bbclass +++ b/meta/classes/nativesdk.bbclass | |||
@@ -54,12 +54,15 @@ FILES_${PN}-dbg += "${prefix}/.debug \ | |||
54 | export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig" | 54 | export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig" |
55 | export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" | 55 | export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" |
56 | 56 | ||
57 | ORIG_DEPENDS := "${DEPENDS}" | 57 | python nativesdk_virtclass_handler () { |
58 | DEPENDS_virtclass-nativesdk ?= "${ORIG_DEPENDS}" | 58 | if not isinstance(e, bb.event.RecipePreFinalise): |
59 | return | ||
59 | 60 | ||
60 | python __anonymous () { | 61 | pn = bb.data.getVar("PN", e.data, True) |
61 | pn = bb.data.getVar("PN", d, True) | 62 | if not pn.endswith("-nativesdk"): |
62 | depends = bb.data.getVar("DEPENDS_virtclass-nativesdk", d, True) | 63 | return |
64 | |||
65 | depends = bb.data.getVar("DEPENDS", e.data, True) | ||
63 | deps = bb.utils.explode_deps(depends) | 66 | deps = bb.utils.explode_deps(depends) |
64 | newdeps = [] | 67 | newdeps = [] |
65 | for dep in deps: | 68 | for dep in deps: |
@@ -71,16 +74,18 @@ python __anonymous () { | |||
71 | newdeps.append(dep + "-nativesdk") | 74 | newdeps.append(dep + "-nativesdk") |
72 | else: | 75 | else: |
73 | newdeps.append(dep) | 76 | newdeps.append(dep) |
74 | bb.data.setVar("DEPENDS_virtclass-nativesdk", " ".join(newdeps), d) | 77 | bb.data.setVar("DEPENDS", " ".join(newdeps), e.data) |
75 | provides = bb.data.getVar("PROVIDES", d, True) | 78 | provides = bb.data.getVar("PROVIDES", e.data, True) |
76 | for prov in provides.split(): | 79 | for prov in provides.split(): |
77 | if prov.find(pn) != -1: | 80 | if prov.find(pn) != -1: |
78 | continue | 81 | continue |
79 | if not prov.endswith("-nativesdk"): | 82 | if not prov.endswith("-nativesdk"): |
80 | provides = provides.replace(prov, prov + "-nativesdk") | 83 | provides = provides.replace(prov, prov + "-nativesdk") |
81 | bb.data.setVar("PROVIDES", provides, d) | 84 | bb.data.setVar("PROVIDES", provides, e.data) |
82 | bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", d, False) + ":virtclass-nativesdk", d) | 85 | bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", e.data, False) + ":virtclass-nativesdk", e.data) |
83 | } | 86 | } |
84 | 87 | ||
88 | addhandler nativesdk_virtclass_handler | ||
89 | |||
85 | do_populate_sysroot[stamp-extra-info] = "" | 90 | do_populate_sysroot[stamp-extra-info] = "" |
86 | do_package[stamp-extra-info] = "" | 91 | do_package[stamp-extra-info] = "" |