Bug 16176 - FILE variable is inconsistent within bbclass files
Summary: FILE variable is inconsistent within bbclass files
Status: NEW
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 6.2 M2
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2026-02-23 19:11 UTC by Joshua Watt
Modified: 2026-10-01 15:47 UTC (History)
4 users (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 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.