Bug 14204

Summary: Variables starting with python_ confuses bitbake
Product: [Build System, Metadata & Runtime] BitBake Reporter: Richard Purdie <richard.purdie>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: poky.bs.watcher, poky.watcher, randy.macleod
Version: 0.0.0   
Target Milestone: 3.3 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

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.