| Summary: | Add support for poisoning of variables | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] BitBake | Reporter: | Igor Stoppa <igor.stoppa> |
| Component: | bitbake | Assignee: | Unassigned <unassigned> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | Low | CC: | patrick.ohly, poky.bs.watcher, poky.watcher, richard.purdie |
| Version: | unspecified | ||
| Target Milestone: | Future | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Yes (doc changes required) | |
|
Description
Igor Stoppa
2016-06-13 10:11:36 UTC
Could you give a bit more information about what kinds of problems you're seeing here? There are a few different ways this could possibly be implemented but that really depends on the exact problem which is being addressed. You can today tell whether a value is set if you use anonymous python by seeing if the return value of getVar is None. If it is None, you know it wasn't set. I'd much prefer checking for that value rather than adding poisoning support to bitbake. Assign to Igor for more info. Yes, I could do as proposed, but what I'm after is to avoid having to add custom code for the check. The scenario I have in mind would be: when creating a recipe, I declare one or more variables as poisoned and then I do not have to worry about when they are used. The first time they are used without being initialised, I get an ERROR. IOW I would like to move the burden of the verification on the tool, instead than on the author of the recipe. Does this clarify the rationale? Back to original state and assignee. The trouble is we need to have consistent behaviour on how we handle default values. Most class code or similar checks for values and errors if they are unset. Adding in a new mechanism for such values would likely confuse more than it would help and we're unlikely to want to use poison values for many of our defaults. |