]> 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)
committerSteve Sakoman <steve@sakoman.com>
Tue, 19 Oct 2021 14:04:49 +0000 (04:04 -1000)
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>
(cherry picked from commit d1c3a87c48b598b6e5624d0affe8bd89320631bf)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-devtools/python/python3/makerace.patch [new file with mode: 0644]
meta/recipes-devtools/python/python3_3.8.11.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..8971f28
--- /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.8.11/Makefile.pre.in
+===================================================================
+--- Python-3.8.11.orig/Makefile.pre.in
++++ Python-3.8.11/Makefile.pre.in
+@@ -1415,7 +1415,7 @@ LIBSUBDIRS=      tkinter tkinter/test tkinter
+               unittest unittest/test unittest/test/testmock \
+               venv venv/scripts venv/scripts/common venv/scripts/posix \
+               curses pydoc_data
+-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 f549bb22058e9fd74e693c1471b78cdfbc4ab7f7..2a2472b3d0321f0efb21447b2413b33677dd8b6e 100644 (file)
@@ -33,6 +33,7 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
            file://0001-configure.ac-fix-LIBPL.patch \
            file://0001-python3-Do-not-hardcode-lib-for-distutils.patch \
            file://0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch \
+           file://makerace.patch \
            "
 
 SRC_URI_append_class-native = " \