diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-25 16:31:07 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-26 21:06:57 +0000 |
| commit | 57d2aa9ffb4187f553a14debe39a223ed4421a51 (patch) | |
| tree | 1eb45efabdec2b0e86860b794a8e41cffc6474aa | |
| parent | fb10e3b83b3fb3c22294ef58c30e531388080a89 (diff) | |
| download | poky-57d2aa9ffb4187f553a14debe39a223ed4421a51.tar.gz | |
native: Implement BBCLASSEXTEND PACKAGES_DYNAMIC handling
Recipes that use native BBCLASSEXTEND and set PACKAGES_DYNAMIC will
currently see PREFERRED_PROVIDER warnings. Some recipes work around this
but lets fix the core code to handle remapping PACKAGES_DYNAMIC correctly
so the workarounds aren't necessary any more.
(From OE-Core rev: e74b416231610ce3962e5b7bc21bd382579802ad)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/classes-recipe/native.bbclass | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/meta/classes-recipe/native.bbclass b/meta/classes-recipe/native.bbclass index 1e94585f3e..cfd299d0c8 100644 --- a/meta/classes-recipe/native.bbclass +++ b/meta/classes-recipe/native.bbclass | |||
| @@ -139,7 +139,7 @@ python native_virtclass_handler () { | |||
| 139 | if "native" not in classextend: | 139 | if "native" not in classextend: |
| 140 | return | 140 | return |
| 141 | 141 | ||
| 142 | def map_dependencies(varname, d, suffix = "", selfref=True): | 142 | def map_dependencies(varname, d, suffix = "", selfref=True, regex=False): |
| 143 | if suffix: | 143 | if suffix: |
| 144 | varname = varname + ":" + suffix | 144 | varname = varname + ":" + suffix |
| 145 | deps = d.getVar(varname) | 145 | deps = d.getVar(varname) |
| @@ -148,7 +148,9 @@ python native_virtclass_handler () { | |||
| 148 | deps = bb.utils.explode_deps(deps) | 148 | deps = bb.utils.explode_deps(deps) |
| 149 | newdeps = [] | 149 | newdeps = [] |
| 150 | for dep in deps: | 150 | for dep in deps: |
| 151 | if dep == pn: | 151 | if regex and dep.startswith("^") and dep.endswith("$"): |
| 152 | newdeps.append(dep[:-1].replace(pn, bpn) + "-native$") | ||
| 153 | elif dep == pn: | ||
| 152 | if not selfref: | 154 | if not selfref: |
| 153 | continue | 155 | continue |
| 154 | newdeps.append(dep) | 156 | newdeps.append(dep) |
| @@ -171,6 +173,7 @@ python native_virtclass_handler () { | |||
| 171 | map_dependencies("RPROVIDES", e.data, pkg) | 173 | map_dependencies("RPROVIDES", e.data, pkg) |
| 172 | map_dependencies("RREPLACES", e.data, pkg) | 174 | map_dependencies("RREPLACES", e.data, pkg) |
| 173 | map_dependencies("PACKAGES", e.data) | 175 | map_dependencies("PACKAGES", e.data) |
| 176 | map_dependencies("PACKAGES_DYNAMIC", e.data, regex=True) | ||
| 174 | 177 | ||
| 175 | provides = e.data.getVar("PROVIDES") | 178 | provides = e.data.getVar("PROVIDES") |
| 176 | nprovides = [] | 179 | nprovides = [] |
