Bug 13599

Summary: Enhancement: Detect variables that shouldn't be defined in image scope, but in global (distro) scope
Product: [QA/Testing] Build Testing Reporter: Mark Hatle <mark.hatle>
Component: generalAssignee: Richard Purdie <richard.purdie>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: Medium+ CC: randy.macleod
Version: unspecified   
Target Milestone: 6.2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Mark Hatle 2019-10-17 15:23:14 UTC
I've seen numerous instances of people trying to set VIRTUAL_RUNTIME_... within an image bb or image bbappend, and then not being able to figure out why it's being "ignored".

There needs to be a way to define the scope of a variable (in human, if not machine terms) and then scan for violations of the scope.

One possible way to do this would be to add a (standard) 'scope' flag to variables.  If unset, it's everywhere.. if it's set to 'distro', then it can only be "set" outside of a recipe.  If it's set to 'recipe' it needs to be set within a recipe or using an override (such as pn-recipe)...