Bug 13599 - Enhancement: Detect variables that shouldn't be defined in image scope, but in global (distro) scope
Summary: Enhancement: Detect variables that shouldn't be defined in image scope, but i...
Status: NEW
Alias: None
Product: Build Testing
Classification: QA/Testing
Component: general (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ enhancement
Target Milestone: 6.2
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2019-10-17 15:23 UTC by Mark Hatle
Modified: 2026-10-01 15:48 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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)...