diff options
| author | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-09 16:04:51 +0000 |
|---|---|---|
| committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-13 12:15:28 +0000 |
| commit | 7b849ae2f5c348bd9c80b5ae46e7d2bc208bd6bb (patch) | |
| tree | afd1d74013e04257166f5bc4d89126fc90021327 /meta/classes/native.bbclass | |
| parent | e78278875615e81aa39bb42207d9717270a614b3 (diff) | |
| download | poky-7b849ae2f5c348bd9c80b5ae46e7d2bc208bd6bb.tar.gz | |
native.bbclass: Fix DEPENDS handling for BBCLASSEXTEND use
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes/native.bbclass')
| -rw-r--r-- | meta/classes/native.bbclass | 50 |
1 files changed, 21 insertions, 29 deletions
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass index 8a5e5f133f..6b5a5919b2 100644 --- a/meta/classes/native.bbclass +++ b/meta/classes/native.bbclass | |||
| @@ -82,46 +82,38 @@ do_stage () { | |||
| 82 | PKG_CONFIG_PATH .= "${EXTRA_NATIVE_PKGCONFIG_PATH}" | 82 | PKG_CONFIG_PATH .= "${EXTRA_NATIVE_PKGCONFIG_PATH}" |
| 83 | PKG_CONFIG_SYSROOT_DIR = "" | 83 | PKG_CONFIG_SYSROOT_DIR = "" |
| 84 | 84 | ||
| 85 | ORIG_DEPENDS := "${DEPENDS}" | ||
| 86 | |||
| 87 | DEPENDS_virtclass-native ?= "${ORIG_DEPENDS}" | ||
| 88 | |||
| 85 | python __anonymous () { | 89 | python __anonymous () { |
| 86 | # If we've a legacy native do_stage, we need to neuter do_install | 90 | # If we've a legacy native do_stage, we need to neuter do_install |
| 87 | stagefunc = bb.data.getVar('do_stage', d, True) | 91 | stagefunc = bb.data.getVar('do_stage', d, True) |
| 88 | if (stagefunc.strip() != "do_stage_native" and stagefunc.strip() != "autotools_stage_all") and bb.data.getVar('AUTOTOOLS_NATIVE_STAGE_INSTALL', d, 1) == "1": | 92 | if (stagefunc.strip() != "do_stage_native" and stagefunc.strip() != "autotools_stage_all") and bb.data.getVar('AUTOTOOLS_NATIVE_STAGE_INSTALL', d, 1) == "1": |
| 89 | bb.data.setVar("do_install", " :", d) | 93 | bb.data.setVar("do_install", " :", d) |
| 90 | 94 | ||
| 91 | pn = bb.data.getVar("PN", d, True) | ||
| 92 | depends = bb.data.getVar("DEPENDS", d, True) | ||
| 93 | deps = bb.utils.explode_deps(depends) | ||
| 94 | newdeps = [] | ||
| 95 | if "native" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""): | 95 | if "native" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""): |
| 96 | autoextend = True | 96 | pn = bb.data.getVar("PN", d, True) |
| 97 | else: | 97 | depends = bb.data.getVar("DEPENDS_virtclass-native", d, True) |
| 98 | autoextend = False | 98 | deps = bb.utils.explode_deps(depends) |
| 99 | for dep in deps: | 99 | newdeps = [] |
| 100 | if dep.endswith("-cross"): | 100 | for dep in deps: |
| 101 | if autoextend: | 101 | if dep.endswith("-cross"): |
| 102 | newdeps.append(dep.replace("-cross", "-native")) | 102 | newdeps.append(dep.replace("-cross", "-native")) |
| 103 | else: | 103 | elif not dep.endswith("-native"): |
| 104 | bb.note("%s has depends %s which ends in -cross?" % (pn, dep)) | 104 | |
| 105 | newdeps.append(dep) | ||
| 106 | elif not dep.endswith("-native"): | ||
| 107 | if autoextend: | ||
| 108 | newdeps.append(dep + "-native") | 105 | newdeps.append(dep + "-native") |
| 109 | else: | 106 | else: |
| 110 | bb.note("%s has depends %s which doesn't end in -native?" % (pn, dep)) | ||
| 111 | newdeps.append(dep) | 107 | newdeps.append(dep) |
| 112 | else: | 108 | bb.data.setVar("DEPENDS_virtclass-native", " ".join(newdeps), d) |
| 113 | newdeps.append(dep) | 109 | provides = bb.data.getVar("PROVIDES", d, True) |
| 114 | bb.data.setVar("DEPENDS", " ".join(newdeps), d) | 110 | for prov in provides.split(): |
| 115 | provides = bb.data.getVar("PROVIDES", d, True) | 111 | if prov.find(pn) != -1: |
| 116 | for prov in provides.split(): | 112 | continue |
| 117 | if prov.find(pn) != -1: | 113 | if not prov.endswith("-native"): |
| 118 | continue | 114 | |
| 119 | if not prov.endswith("-native"): | ||
| 120 | if autoextend: | ||
| 121 | provides = provides.replace(prov, prov + "-native") | 115 | provides = provides.replace(prov, prov + "-native") |
| 122 | #else: | 116 | bb.data.setVar("PROVIDES", provides, d) |
| 123 | # bb.note("%s has rouge PROVIDES of %s which doesn't end in -sdk?" % (pn, prov)) | 117 | bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", d, False) + ":virtclass-native", d) |
| 124 | bb.data.setVar("PROVIDES", provides, d) | ||
| 125 | bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", d, False) + ":virtclass-native", d) | ||
| 126 | } | 118 | } |
| 127 | 119 | ||
