mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
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>
This commit is contained in:
@@ -139,7 +139,7 @@ python native_virtclass_handler () {
|
||||
if "native" not in classextend:
|
||||
return
|
||||
|
||||
def map_dependencies(varname, d, suffix = "", selfref=True):
|
||||
def map_dependencies(varname, d, suffix = "", selfref=True, regex=False):
|
||||
if suffix:
|
||||
varname = varname + ":" + suffix
|
||||
deps = d.getVar(varname)
|
||||
@@ -148,7 +148,9 @@ python native_virtclass_handler () {
|
||||
deps = bb.utils.explode_deps(deps)
|
||||
newdeps = []
|
||||
for dep in deps:
|
||||
if dep == pn:
|
||||
if regex and dep.startswith("^") and dep.endswith("$"):
|
||||
newdeps.append(dep[:-1].replace(pn, bpn) + "-native$")
|
||||
elif dep == pn:
|
||||
if not selfref:
|
||||
continue
|
||||
newdeps.append(dep)
|
||||
@@ -171,6 +173,7 @@ python native_virtclass_handler () {
|
||||
map_dependencies("RPROVIDES", e.data, pkg)
|
||||
map_dependencies("RREPLACES", e.data, pkg)
|
||||
map_dependencies("PACKAGES", e.data)
|
||||
map_dependencies("PACKAGES_DYNAMIC", e.data, regex=True)
|
||||
|
||||
provides = e.data.getVar("PROVIDES")
|
||||
nprovides = []
|
||||
|
||||
Reference in New Issue
Block a user