-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
0024-utils-avoid-adding-duplicated-kernel-entries.patch
34 lines (27 loc) · 1.37 KB
/
0024-utils-avoid-adding-duplicated-kernel-entries.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 13c0d48590c8cc285bc3b783ac97301a583c1864 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?=
<frederic.pierret@qubes-os.org>
Date: Sat, 16 Oct 2021 17:36:15 +0200
Subject: [PATCH] utils: avoid adding duplicated kernel entries
List kernel versions without duplicates, even when there are multiple
files related to the same kernel version.
Duplicated kernel versions here caused regenerating initramfs multiple
times and duplicated entries in xen.cfg.
QubesOS/qubes-issues#3624
Adapted from https://github.com/QubesOS/qubes-anaconda/blob/677b12bf6206bc10ffae88435cefb261c2ee9105/0015-Avoid-adding-duplicated-kernel-entries.patch
---
pyanaconda/modules/payloads/payload/live_os/utils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/modules/payloads/payload/live_os/utils.py b/pyanaconda/modules/payloads/payload/live_os/utils.py
index 9d12238019..aecfff1fd8 100644
--- a/pyanaconda/modules/payloads/payload/live_os/utils.py
+++ b/pyanaconda/modules/payloads/payload/live_os/utils.py
@@ -36,7 +36,7 @@ def get_kernel_version_list(root_path):
files.extend(glob.glob(root_path + "/boot/efi/EFI/{}/vmlinuz-*".format(efi_dir)))
kernel_version_list = [
- f.split("/")[-1][8:] for f in files
+ f.split("/")[-1][8:] for f in set(files)
if os.path.isfile(f) and "-rescue-" not in f
]
--
2.45.2