summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3-installer
diff options
context:
space:
mode:
authorAlexander Kanavin <alex@linutronix.de>2024-10-16 21:36:02 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-10-22 12:28:17 +0100
commitf7be321a8d19e1fb27ed91ad8a55b1696d34b954 (patch)
tree584722c711716cbbc02abe42029576236c7c9772 /meta/recipes-devtools/python/python3-installer
parent67cf5e5bde335ed5926dc14d1fa17ecf7dc1202f (diff)
downloadpoky-f7be321a8d19e1fb27ed91ad8a55b1696d34b954.tar.gz
python3-installer: add a patch to ensure RECORD file reproducibility
(From OE-Core rev: 982dce3dd65f786d3c9c12216be49c3be5b9e928) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python3-installer')
-rw-r--r--meta/recipes-devtools/python/python3-installer/0001-src-installer-utils.py-sort-entries-before-writing-o.patch27
1 files changed, 27 insertions, 0 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 @@
1From 760ddf50ce559abd67bbdd31797267d00bcddfb3 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Tue, 1 Oct 2024 19:22:11 +0200
4Subject: [PATCH] src/installer/utils.py: sort entries before writing out
5 RECORD file
6
7This helps build reproducibility.
8
9Upstream-Status: Submitted [https://github.com/pypa/installer/pull/245]
10Signed-off-by: Alexander Kanavin <alex@linutronix.de>
11---
12 src/installer/utils.py | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/src/installer/utils.py b/src/installer/utils.py
16index 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()