From: Richard Purdie <richard.pur...@linuxfoundation.org>

Add a fix for reproducibility issues where pyc files for python-config.py
may not always be generated.

Signed-off-by: Richard Purdie <richard.pur...@linuxfoundation.org>
(cherry picked from commit d1c3a87c48b598b6e5624d0affe8bd89320631bf)
Signed-off-by: Anuj Mittal <anuj.mit...@intel.com>
---
 .../python/python3/makerace.patch             | 23 +++++++++++++++++++
 meta/recipes-devtools/python/python3_3.9.5.bb |  1 +
 2 files changed, 24 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3/makerace.patch

diff --git a/meta/recipes-devtools/python/python3/makerace.patch 
b/meta/recipes-devtools/python/python3/makerace.patch
new file mode 100644
index 0000000000..96744cb557
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/makerace.patch
@@ -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.pur...@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 \
diff --git a/meta/recipes-devtools/python/python3_3.9.5.bb 
b/meta/recipes-devtools/python/python3_3.9.5.bb
index 82177f4a18..2b05bd530e 100644
--- a/meta/recipes-devtools/python/python3_3.9.5.bb
+++ b/meta/recipes-devtools/python/python3_3.9.5.bb
@@ -31,6 +31,7 @@ SRC_URI = 
"http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
            
file://0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch \
            
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://makerace.patch \
            "
 
 SRC_URI_append_class-native = " \
-- 
2.31.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157535): 
https://lists.openembedded.org/g/openembedded-core/message/157535
Mute This Topic: https://lists.openembedded.org/mt/86630212/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to