Bug 15762

Summary: BBFILES_DYNAMIC has no default value
Product: [Build System, Metadata & Runtime] BitBake Reporter: kweihmann
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: Undecided CC: poky.bs.watcher, poky.watcher
Version: unspecified   
Target Milestone: 0.0.0   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description kweihmann 2025-02-16 10:56:06 UTC
BBFILES_DYNAMIC doesn't come with a default value

bitbake-getvar BBFILES_DYNAMIC
NOTE: Starting bitbake server...
The variable 'BBFILES_DYNAMIC' is not defined

unless it used by any of the layers in the setup.

As it's a builtin feature of bitbake, it should come with an empty default value.
Comment 1 Richard Purdie 2025-02-16 23:45:23 UTC
I don't see why just because it is a variable bitbake can use, it needs to have an empty value...
Comment 2 kweihmann 2025-02-17 05:09:52 UTC
Because there is currently no way to determine if a variable is supported, but by an intensive code grep, for variables that could be used.

Unfortunately the documentation is not always up to date, so the easiest would be to
use bitbake-getvar <VAR>, and if it has a history entry, support is still given.
Because all the variables are reported the same way, as they would be haven been removed entirely from the code base with the available tooling, so there is no way to get the information (without grepping the code).

In my opinion it won't hurt to define an empty value (as it will not have any technical implications) but open up this use case, which could also be used to automatically check the consistency of the documentation, in case there needs to be a use case just within core.
Comment 3 Richard Purdie 2025-02-17 12:47:43 UTC
(In reply to kweihmann from comment #2)
> Because there is currently no way to determine if a variable is supported,
> but by an intensive code grep, for variables that could be used.
> 
> Unfortunately the documentation is not always up to date, so the easiest
> would be to
> use bitbake-getvar <VAR>, and if it has a history entry, support is still
> given.
> Because all the variables are reported the same way, as they would be haven
> been removed entirely from the code base with the available tooling, so
> there is no way to get the information (without grepping the code).
> 
> In my opinion it won't hurt to define an empty value (as it will not have
> any technical implications) but open up this use case, which could also be
> used to automatically check the consistency of the documentation, in case
> there needs to be a use case just within core.

I very strongly disagree. 

If things are missing in the documentation lets fix them but I do not want to add pointless defaults for all possible variables, it will clutter the code more that helping anything.