Bug 16176

Summary: FILE variable is inconsistent within bbclass files
Product: [Build System, Metadata & Runtime] BitBake Reporter: Joshua Watt <JPEWhacker>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Medium+ CC: ccasciato, poky.bs.watcher, poky.watcher, randy.macleod
Version: unspecified   
Target Milestone: 6.2 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Joshua Watt 2026-02-23 19:11:17 UTC
The FILE variable behaves highly inconsistently when used inside a bbclass. It's value will be different depending on where the `inherit` occurs (for example, if the inherit is in a recipe, FILE will refer to the recipe, where as if it's in an .inc file, it will refer to the .inc file).

See the bb.tests.parse.ParseTest.test_file_variables for some tests that highlight some of the current inconsistencies.