| Summary: |
Document conditional inherits |
| Product: |
[Documentation] BitBake User Manual
|
Reporter: |
Paul Eggleton <bluelightning> |
| Component: |
bitbake-manual | Assignee: |
Scott Rifenbark <srifenbark> |
| Status: |
RESOLVED
FIXED
|
QA Contact: |
|
| Severity: |
enhancement
|
|
|
| Priority: |
Medium+
|
CC: |
joshuagloe, srifenbark
|
| Version: |
unspecified | |
|
| Target Milestone: |
2.1 M4 | |
|
| Hardware: |
x86 | |
|
| OS: |
Multiple | |
|
| Whiteboard: |
21 March 2016: RESOLVED |
|
OS type for building Yocto:
|
---
|
Type of Regression:
|
---
|
|
Verified:
|
|
Documentation change:
|
Done (doc changes complete)
|
Under "3.3.2. inherit Directive" in the BitBake manual we should add some information at the end mentioning that you can do conditional inherits by using a variable expression after the inherit i.e. inherit ${VARNAME} If VARNAME is going to be set it needs to be set before the inherit statement is parsed (possibly achieving conditionality using overrides or through an anonymous python function). If the variable evaluates to an empty string the statement will not trigger a syntax error i.e. it becomes a no-op. Of course an in-line Python expression is also permissible e.g. inherit ${@'classname' if condition else ''} inherit ${@functionname(params)} This brings up a tangential point - we don't currently explain in-line Python; we do mention it in passing but we ought to have a small section on it in the BitBake manual.