NOAUTOPACKAGEDEBUG used by packaging is lacking a default value > bitbake-getvar NOAUTOPACKAGEDEBUG returns > The variable 'NOAUTOPACKAGEDEBUG' is not defined The code in packaging is doing a "not (d.getVar("NOAUTOPACKAGEDEBUG") or False)" only, so having a documented and defined empty value will not impact functionality
It may not impact functionality but there is no need to set a default value. I don't see any need to set one or a need to open all these bugs. Missing documentation is something we should however fix.
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. Besides that all class code in my opinion needs to be self sufficient, meaning all variables used need to be defined, as that helps with a) documentation (in this particular case already done, but missing for a lot of others b) render test cases (not sure, but I don't remember seeing one for this feature) c) making review of patches easier, as one can spot easier the parts that are influenced by configuration
As per several other bugs opened of this type, we are not adding default values for the sake of it.
Creating or documenting default values isn't going to happen.