| Summary: | Bitbake should warn about whitespace misuse in variable assignments | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] BitBake | Reporter: | Evadeflow <evadeflow> |
| Component: | bitbake | Assignee: | Unassigned <unassigned> |
| Status: | NEW --- | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | Medium | CC: | alexandre.belloni, poky.bs.watcher, poky.watcher, randy.macleod |
| Version: | unspecified | ||
| Target Milestone: | 6.99 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Yes (doc changes required) | |
|
Description
Evadeflow
2019-02-26 19:09:30 UTC
Still a useful idea. There are variables that are colon separated lists, like FILESEXTRAPATHS where one would use:
FILESEXTRAPATHS:prepend := "${THISDIR}/util-linux:"
as in meta/recipes-core/util-linux/util-linux.inc
So the first example is not something we can warn about without annotating whether the variable is a space separated list or not which will add overhead to bitbake parsing code.
Also, if someone omits the space, the result is likely to not work as expected which will get fixed.
The second case is cosmetic and is easier to warn about. However, we have variables that will include other variables that may be empty, so we will never be able to catch all the duplicated spaces. E.g:
CORE_IMAGE_BASE_INSTALL = '\
packagegroup-core-boot \
packagegroup-base-extended \
\
${CORE_IMAGE_EXTRA_INSTALL} \
'
CORE_IMAGE_EXTRA_INSTALL ?= ""
IMAGE_INSTALL ?= "${CORE_IMAGE_BASE_INSTALL}"
As soon as you append something to IMAGE_INSTALL (with a space then) and CORE_IMAGE_EXTRA_INSTALL stays empty, you will have two consecutive spaces.
Bulk move from 4.99 or 0.00 to 5.99 |