Bug 14140

Summary: variable flags starting with underscore are silently ignored
Product: [Build System, Metadata & Runtime] BitBake Reporter: Yann Dirson <ydirson>
Component: bitbakeAssignee: Michael Opdenacker <michael.opdenacker>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: poky.bs.watcher, poky.watcher, randy.macleod
Version: unspecified   
Target Milestone: 4.2 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Yann Dirson 2020-12-01 14:01:47 UTC
VAR[_a] = "foo" (or any underscore-starting flag name I tried) does not trigger a warning or error, but a subsequent getVarFlags("VAR") call never shows those flags starting with underscore.

If it is a limitation I'd think we should document it and add a warning or maybe even an error.  But then it's maybe just a bug :)
Comment 1 Randy MacLeod 2020-12-03 15:41:42 UTC
This is expected behaviour, the _ is for internal usage but should documented.
Comment 2 Randy MacLeod 2021-04-22 17:51:36 UTC
Michael, Could you check if this expected usage limitation is in the docs and if not, add it?
Comment 3 Michael Opdenacker 2022-09-21 13:33:33 UTC
Indeed, the behavior remains the same.
I posted a patch to document this:
https://lists.yoctoproject.org/g/docs/message/3200
Comment 4 Michael Opdenacker 2022-10-28 13:33:45 UTC
Now fixed in master:
https://git.openembedded.org/bitbake/commit/?id=0f3e9d87168813ce49995ff04bccdce11c5f7b47