diff options
-rw-r--r-- | meta/recipes-devtools/python/python3-installer/0001-src-installer-utils.py-sort-entries-before-writing-o.patch | 27 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3-installer_0.7.0.bb | 3 |
2 files changed, 29 insertions, 1 deletions
diff --git a/meta/recipes-devtools/python/python3-installer/0001-src-installer-utils.py-sort-entries-before-writing-o.patch b/meta/recipes-devtools/python/python3-installer/0001-src-installer-utils.py-sort-entries-before-writing-o.patch new file mode 100644 index 0000000000..a6715ed457 --- /dev/null +++ b/meta/recipes-devtools/python/python3-installer/0001-src-installer-utils.py-sort-entries-before-writing-o.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From 760ddf50ce559abd67bbdd31797267d00bcddfb3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex@linutronix.de> | ||
3 | Date: Tue, 1 Oct 2024 19:22:11 +0200 | ||
4 | Subject: [PATCH] src/installer/utils.py: sort entries before writing out | ||
5 | RECORD file | ||
6 | |||
7 | This helps build reproducibility. | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/pypa/installer/pull/245] | ||
10 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
11 | --- | ||
12 | src/installer/utils.py | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/src/installer/utils.py b/src/installer/utils.py | ||
16 | index 3e601d6..073297c 100644 | ||
17 | --- a/src/installer/utils.py | ||
18 | +++ b/src/installer/utils.py | ||
19 | @@ -207,7 +207,7 @@ def construct_record_file( | ||
20 | io.BytesIO(), encoding="utf-8", write_through=True, newline="" | ||
21 | ) | ||
22 | writer = csv.writer(stream, delimiter=",", quotechar='"', lineterminator="\n") | ||
23 | - for scheme, record in records: | ||
24 | + for scheme, record in sorted(records, key=lambda x: x[1].path): | ||
25 | writer.writerow(record.to_row(prefix_for_scheme(scheme))) | ||
26 | stream.seek(0) | ||
27 | return stream.detach() | ||
diff --git a/meta/recipes-devtools/python/python3-installer_0.7.0.bb b/meta/recipes-devtools/python/python3-installer_0.7.0.bb index 9429705b1f..6aaf1b3a37 100644 --- a/meta/recipes-devtools/python/python3-installer_0.7.0.bb +++ b/meta/recipes-devtools/python/python3-installer_0.7.0.bb | |||
@@ -6,7 +6,8 @@ BUGTRACKER = "https://github.com/pypa/installer/issues" | |||
6 | LICENSE = "MIT" | 6 | LICENSE = "MIT" |
7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=5038641aec7a77451e31da828ebfae00" | 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=5038641aec7a77451e31da828ebfae00" |
8 | 8 | ||
9 | SRC_URI += "file://interpreter.patch" | 9 | SRC_URI += "file://interpreter.patch \ |
10 | file://0001-src-installer-utils.py-sort-entries-before-writing-o.patch" | ||
10 | 11 | ||
11 | SRC_URI[sha256sum] = "a26d3e3116289bb08216e0d0f7d925fcef0b0194eedfa0c944bcaaa106c4b631" | 12 | SRC_URI[sha256sum] = "a26d3e3116289bb08216e0d0f7d925fcef0b0194eedfa0c944bcaaa106c4b631" |
12 | 13 | ||