summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-05-27 11:43:36 +0100
committerSteve Sakoman <steve@sakoman.com>2022-06-20 06:47:01 -1000
commit2f93d30fee0698e3cf13be17f1691e85d2122b0e (patch)
tree4b78d94dad3bb01db4f66165b6cc357c5ba0d43a
parent8e34686911269e461dc646068f7a4d7c0e5da53f (diff)
downloadopenembedded-core-contrib-2f93d30fee0698e3cf13be17f1691e85d2122b0e.tar.gz
python3: Remove problematic paths from sysroot files
In the native sysroot we should never have paths to the python3-native build directory. These may or may not exist at the time some dependency is building and nothing should rely upon them. I suspect nothing is relying on this at the moment but clean up just to be sure. The various config copies are adjusted to be modified consistently as some copies were and some were not. The Makefile has the "bad" ${B} paths replaced with a dummy placeholder too. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ae9e6249ded8fc063d6333231c391cfa2d594567) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-devtools/python/python3_3.10.4.bb10
1 files changed, 7 insertions, 3 deletions
diff --git a/meta/recipes-devtools/python/python3_3.10.4.bb b/meta/recipes-devtools/python/python3_3.10.4.bb
index 2ef320350e..9f1b96b519 100644
--- a/meta/recipes-devtools/python/python3_3.10.4.bb
+++ b/meta/recipes-devtools/python/python3_3.10.4.bb
@@ -165,6 +165,9 @@ do_install:append:class-native() {
# tarballs and sysroot creation.
find ${D} -name *.pyc -delete
+ # Nothing should be looking into ${B} for python3-native
+ sed -i -e 's:${B}:/build/path/unavailable/:g' \
+ ${D}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}*/Makefile
}
do_install:append() {
@@ -175,15 +178,16 @@ do_install:append() {
mkdir -p ${D}${libdir}/python-sysconfigdata
sysconfigfile=`find ${D} -name _sysconfig*.py`
- cp $sysconfigfile ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py
-
sed -i \
-e "s,^ 'LIBDIR'.*, 'LIBDIR': '${STAGING_LIBDIR}'\,,g" \
-e "s,^ 'INCLUDEDIR'.*, 'INCLUDEDIR': '${STAGING_INCDIR}'\,,g" \
-e "s,^ 'CONFINCLUDEDIR'.*, 'CONFINCLUDEDIR': '${STAGING_INCDIR}'\,,g" \
-e "/^ 'INCLDIRSTOMAKE'/{N; s,/usr/include,${STAGING_INCDIR},g}" \
-e "/^ 'INCLUDEPY'/s,/usr/include,${STAGING_INCDIR},g" \
- ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py
+ -e "s,${B},/build/path/unavailable/,g" \
+ $sysconfigfile
+ cp $sysconfigfile ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py
+
# Unfortunately the following pyc files are non-deterministc due to 'frozenset'
# being written without strict ordering, even with PYTHONHASHSEED = 0