Bug 14204 - Variables starting with python_ confuses bitbake
Summary: Variables starting with python_ confuses bitbake
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 0.0.0
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 3.3 M3
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2021-01-27 16:34 UTC by Richard Purdie
Modified: 2021-02-11 15:22 UTC (History)
3 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 Richard Purdie 2021-01-27 16:34:19 UTC
This does not work:

SYSROOT_PREPROCESS_FUNCS += " python_sysroot_cleanup"
python_sysroot_cleanup () {
	rm -rf ${SYSROOT_DESTDIR}${libdir}/python${PYTHON_MAJMIN}/test
}

and interestingly and perhaps revealingly, it gives a warning about tab indentation in a python function when its a shell function.

This works:

SYSROOT_PREPROCESS_FUNCS += " py3_sysroot_cleanup"
py3_sysroot_cleanup () {
	rm -rf ${SYSROOT_DESTDIR}${libdir}/python${PYTHON_MAJMIN}/test
}

so it would appear calling variables something with "python_" at the start is problematic.