| Summary: | Suggested rewriting of the CLASSOVERRIDE glossary entry | ||
|---|---|---|---|
| Product: | [Documentation] Reference | Reporter: | ulfalizer |
| Component: | handbook | Assignee: | Scott Rifenbark <srifenbark> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | bluelightning, poky.doc.watcher, poky.watcher, sgw, srifenbark |
| Version: | 2.2 | ||
| Target Milestone: | 2.2 M4 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | 01 Sept 2016: RESOLVED | ||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Done (doc changes complete) | |
Ulf, See http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var-CLASSOVERRIDE Thanks, Scott Looks good to me. Thanks, Ulf Hmz... on a second thought, maybe it would be better if there was an example that did a straight assignment instead of using _append. Could the second example (the DEPENDS one) be replaced with the following? Here is an example where FOO is set to "native" when building for the build host, and to "other" otherwise: FOO_class-native = "native" FOO = "other" Cheers, Ulf (You could close right away if you're fine with that change btw. :) Ulf, I put it in but not verbatim. Look at the sentence right before the new example. I hope you are okay with that. http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var-CLASSOVERRIDE Thanks, Scott <setting to RESOLVED and clearing the doc flag. If you don't like my re-wording just send me another comment on here.> |
...to include another example, explain where CLASSOVERRIDE is set, add some notes, and link back to OVERRIDES: CLASSOVERRIDE: An internal variable specifying the special class override that should currently apply (e.g. "class-target", "class-native", and so forth). The classes that use this variable (e.g. [native.bbclass], [nativesdk.bbclass], and so forth) set it to appropriate values. Note { CLASSOVERRIDE gets its default "class-target" value from bitbake.conf. } As an example, the following override allows you to install extra files, but only when building for the target: do_install_append_class-target() { install my-extra-file ${D}${sysconfdir} } Here is an example where "python-native" is added to DEPENDS, but only when building for the build host: DEPENDS_append_class-native = " python-native" The underlying mechanism behind CLASSOVERRIDE is simply that is it included in the default value of [OVERRIDES]. Cheers, Ulf