| Summary: | Overrides are evaluated for primary and multilib configuration, causing potential conflicts | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Mark Hatle <mark.hatle> |
| Component: | core | Assignee: | Richard Purdie <richard.purdie> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | Medium+ | CC: | meta.mr.watcher, meta.watcher |
| Version: | 1.4 | ||
| Target Milestone: | 1.4 M4 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | --- | |
|
Description
Mark Hatle
2013-02-11 16:35:03 UTC
After some investigation. It appears that the problem is related to the order in which bitbake processes various anonymous python chunks, specifically in:
bitbake/lib/bb/parse/ast.py:
def finalize(fn, d, variant = None):
all_handlers = {}
for var in d.getVar('__BBHANDLERS') or []:
...
bb.event.fire(bb.event.RecipePreFinalise(fn), d)
bb.data.expandKeys(d)
bb.data.update_data(d)
code = []
for funcname in d.getVar("__BBANONFUNCS") or []:
code.append("%s(d)" % funcname)
bb.utils.better_exec("\n".join(code), {"d": d})
bb.data.update_data(d)
...
The first update_data sets the values (and appends) using the default tune, while the second sets the values based on the updated OVERRIDES settings from the anonfuncs.
Possible workaround (fix?) from Richard Purdie:
diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index 5454b4c..d52f721 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -51,6 +51,11 @@ python multilib_virtclass_handler () {
e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
e.data.setVar("SHLIBSDIR_virtclass-multilib-" + variant ,e.data.getVar("SHL
e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + override)
+
+ # Workaround for issue in YP Bugzilla #3874
+ newtune = e.data.getVar("DEFAULTTUNE_" + "virtclass-multilib-" + variant)
+ if newtune:
+ e.data.setVar("DEFAULTTUNE", newtune)
}
addhandler multilib_virtclass_handler
The issue is that OVERRIDES has virtclass-multilib-xxxx added to it, this eventually changed DEFAULTTUNE which then changes TRANSLATED_TARGET_ARCH which is in OVERRIDES meaning we then need to reevaulate the overides and the TTA gets applied twice since once you apply an override, it doesn't get undone. Expanding DEFAULTTUNE to the correct value in advance avoids the issue and means only the correct overrides get applied. |