Fix failing builds due to a reproducibility issue by adding a patch to sort
globbing, submitted upstream.

[YCOTO #14993]
[YCOTO #14994]

Signed-off-by: Richard Purdie <[email protected]>
---
 .../python3-poetry-core/deterministic.patch   | 23 +++++++++++++++++++
 .../python/python3-poetry-core_1.4.0.bb       |  2 ++
 2 files changed, 25 insertions(+)
 create mode 100644 
meta/recipes-devtools/python/python3-poetry-core/deterministic.patch

diff --git 
a/meta/recipes-devtools/python/python3-poetry-core/deterministic.patch 
b/meta/recipes-devtools/python/python3-poetry-core/deterministic.patch
new file mode 100644
index 00000000000..402ee530944
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-poetry-core/deterministic.patch
@@ -0,0 +1,23 @@
+builders/wheel: Ensure dist-info is written determinisically
+
+glob() returns values in "on disk" order. To make the RECORD file
+deterministic and consistent between builds we need to sort the
+data before adding to the records list.
+
+Signed-off-by: Richard Purdie <[email protected]>
+
+Upstream-Status: Submitted 
[https://github.com/python-poetry/poetry-core/pull/545]
+
+Index: builders/wheel.py
+===================================================================
+--- a/src/poetry/core/masonry/builders/wheel.py
++++ b/src/poetry/core/masonry/builders/wheel.py
+@@ -294,7 +294,7 @@ class WheelBuilder(Builder):
+ 
+     def _copy_dist_info(self, wheel: zipfile.ZipFile, source: Path) -> None:
+         dist_info = Path(self.dist_info)
+-        for file in source.glob("**/*"):
++        for file in sorted(source.glob("**/*") ):
+             if not file.is_file():
+                 continue
+ 
diff --git a/meta/recipes-devtools/python/python3-poetry-core_1.4.0.bb 
b/meta/recipes-devtools/python/python3-poetry-core_1.4.0.bb
index 22a6a2a4778..8a950220125 100644
--- a/meta/recipes-devtools/python/python3-poetry-core_1.4.0.bb
+++ b/meta/recipes-devtools/python/python3-poetry-core_1.4.0.bb
@@ -26,6 +26,8 @@ inherit python_poetry_core pypi
 PYPI_ARCHIVE_NAME = "poetry_core-${PV}.${PYPI_PACKAGE_EXT}"
 S = "${WORKDIR}/poetry_core-${PV}"
 
+SRC_URI += "file://deterministic.patch"
+
 RDEPENDS:${PN}:append:class-target = "\
     python3-compression \
     python3-core \
-- 
2.37.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#174978): 
https://lists.openembedded.org/g/openembedded-core/message/174978
Mute This Topic: https://lists.openembedded.org/mt/95843170/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to