diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-12-23 11:12:28 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-12-23 22:59:03 +0000 |
commit | b3cf48d741c02295a6a9b2d08ddd57074e65eeb6 (patch) | |
tree | 4430cf5638f5a0b2fa06972c01c4fcb24807b7ab | |
parent | 55dbedbd242221ad1a3fa8aceb6789524193ae1a (diff) | |
download | poky-b3cf48d741c02295a6a9b2d08ddd57074e65eeb6.tar.gz |
python3-poetry-core: Fix determinism issue breaking reproducibility
Fix failing builds due to a reproducibility issue by adding a patch to sort
globbing, submitted upstream.
[YCOTO #14993]
[YCOTO #14994]
(From OE-Core rev: ad6cc43ca99d8629365fcff790becbc7103da9ec)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/python/python3-poetry-core/deterministic.patch | 23 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3-poetry-core_1.4.0.bb | 2 |
2 files changed, 25 insertions, 0 deletions
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 0000000000..402ee53094 --- /dev/null +++ b/meta/recipes-devtools/python/python3-poetry-core/deterministic.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | builders/wheel: Ensure dist-info is written determinisically | ||
2 | |||
3 | glob() returns values in "on disk" order. To make the RECORD file | ||
4 | deterministic and consistent between builds we need to sort the | ||
5 | data before adding to the records list. | ||
6 | |||
7 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/python-poetry/poetry-core/pull/545] | ||
10 | |||
11 | Index: builders/wheel.py | ||
12 | =================================================================== | ||
13 | --- a/src/poetry/core/masonry/builders/wheel.py | ||
14 | +++ b/src/poetry/core/masonry/builders/wheel.py | ||
15 | @@ -294,7 +294,7 @@ class WheelBuilder(Builder): | ||
16 | |||
17 | def _copy_dist_info(self, wheel: zipfile.ZipFile, source: Path) -> None: | ||
18 | dist_info = Path(self.dist_info) | ||
19 | - for file in source.glob("**/*"): | ||
20 | + for file in sorted(source.glob("**/*") ): | ||
21 | if not file.is_file(): | ||
22 | continue | ||
23 | |||
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 22a6a2a477..8a95022012 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 | |||
26 | PYPI_ARCHIVE_NAME = "poetry_core-${PV}.${PYPI_PACKAGE_EXT}" | 26 | PYPI_ARCHIVE_NAME = "poetry_core-${PV}.${PYPI_PACKAGE_EXT}" |
27 | S = "${WORKDIR}/poetry_core-${PV}" | 27 | S = "${WORKDIR}/poetry_core-${PV}" |
28 | 28 | ||
29 | SRC_URI += "file://deterministic.patch" | ||
30 | |||
29 | RDEPENDS:${PN}:append:class-target = "\ | 31 | RDEPENDS:${PN}:append:class-target = "\ |
30 | python3-compression \ | 32 | python3-compression \ |
31 | python3-core \ | 33 | python3-core \ |