[kirkstone,3/9] python3: fix reproducibility issue with python3-core

Message ID 00b62965bd4c9eb6fd8c016f83126da2a107a5c5.1653313955.git.steve@sakoman.com
State Accepted, archived
Commit 00b62965bd4c9eb6fd8c016f83126da2a107a5c5
Headers show
Series [kirkstone,1/9] curl: Backport CVE fixes | expand

Commit Message

Steve Sakoman May 23, 2022, 1:59 p.m. UTC
traceback.cpython-310.pyc is non-deterministic due to 'frozenset'
being written without strict ordering.  For now let's just not
install the problematic file.

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 4b1f0f7542abcb8606688c974695a6c8a142e7a2)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 meta/recipes-devtools/python/python3_3.10.4.bb | 5 +++++
 1 file changed, 5 insertions(+)

Patch

diff --git a/meta/recipes-devtools/python/python3_3.10.4.bb b/meta/recipes-devtools/python/python3_3.10.4.bb
index d678d55083..2ef320350e 100644
--- a/meta/recipes-devtools/python/python3_3.10.4.bb
+++ b/meta/recipes-devtools/python/python3_3.10.4.bb
@@ -193,6 +193,11 @@  do_install:append() {
         rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_range.cpython*
         rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_xml_etree.cpython*
 
+        # Similar to the above, we're getting reproducibility issues with 
+        # /usr/lib/python3.10/__pycache__/traceback.cpython-310.pyc
+        # so remove it too
+        rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/__pycache__/traceback.cpython*
+
         # Remove the opt-1.pyc and opt-2.pyc files. They effectively waste space on embedded
         # style targets as they're only used when python is called with the -O or -OO options
         # which is rare.