]> code.ossystems Code Review - openembedded-core.git/commitdiff
python3: Add a fix for a make install race
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 13 Jul 2021 22:19:29 +0000 (23:19 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 16 Jul 2021 20:21:08 +0000 (21:21 +0100)
Add a fix for reproducibility issues where pyc files for python-config.py
may not always be generated.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/python/python3/makerace.patch [new file with mode: 0644]
meta/recipes-devtools/python/python3_3.9.6.bb

diff --git a/meta/recipes-devtools/python/python3/makerace.patch b/meta/recipes-devtools/python/python3/makerace.patch
new file mode 100644 (file)
index 0000000..96744cb
--- /dev/null
@@ -0,0 +1,23 @@
+libainstall installs python-config.py but the .pyc cache files are generated
+by the libinstall target. This means some builds may not generate the pyc files
+for python-config.py depending on the order things happen in. This means builds
+are not always reproducible.
+
+Add a dependency to avoid the race.
+
+Upstream-Status: Pending
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Index: Python-3.9.6/Makefile.pre.in
+===================================================================
+--- Python-3.9.6.orig/Makefile.pre.in
++++ Python-3.9.6/Makefile.pre.in
+@@ -1486,7 +1486,7 @@ LIBSUBDIRS=      tkinter tkinter/test tkinter
+               venv venv/scripts venv/scripts/common venv/scripts/posix \
+               curses pydoc_data \
+               zoneinfo
+-libinstall:   build_all $(srcdir)/Modules/xxmodule.c
++libinstall:   build_all $(srcdir)/Modules/xxmodule.c libainstall
+       @for i in $(SCRIPTDIR) $(LIBDEST); \
+       do \
+               if test ! -d $(DESTDIR)$$i; then \
index af7ed208b9c77c0ca40bc26b493b2ee269f387c7..986dfda83dc135ee42643ba6ee97d6bbf6b5b1f8 100644 (file)
@@ -31,6 +31,7 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
            file://0001-Lib-sysconfig.py-use-libdir-values-from-configuratio.patch \
            file://0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch \
            file://0001-test_ctypes.test_find-skip-without-tools-sdk.patch \
+           file://makerace.patch \
            "
 
 SRC_URI_append_class-native = " \