Bug 15276 - perf: setting PACKAGECONFIG in .bbappend does not work as expected
Summary: perf: setting PACKAGECONFIG in .bbappend does not work as expected
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: kernel (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ minor
Target Milestone: 5.1
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2023-11-07 08:23 UTC by Rasmus Villemoes
Modified: 2024-08-07 16:16 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rasmus Villemoes 2023-11-07 08:23:19 UTC
See https://lore.kernel.org/all/27439f1c-a64d-41a0-815e-882a1a9a5b4d@prevas.dk/ .

The problem is that the line

inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3targetconfig', '', d)}

ends up doing an immediate expansion of PACKAGECONFIG, so if one tries to set PACKAGECONFIG in a .bbappend, the value used in the inherit line (i.e. the weak default set in the recipe) does include the word "python".

If the final PACKAGECONFIG value set in the .bbappend file does not, the dependency machinery does not pull in python.

That shouldn't be a problem, except that it is, because perf's build system behaves differently when there is a PYTHON variable in the environment (which there is, because the recipe has implicitly inherited python3native, which does 'export PYTHON'). So the build actually breaks.
Comment 1 Richard Purdie 2024-08-07 16:16:44 UTC
Fixed with the addition of inherit_defer:

https://git.yoctoproject.org/poky/commit/meta/recipes-kernel/perf?id=c917323a39da6fc3e8d92b2fe907d0357149c9bb