From 7c67b93468d7ee1a495f78eb653db8f1be379e89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 28 Mar 2018 02:46:58 +0200 Subject: [PATCH] anaconda: 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 --- anaconda/pyanaconda/packaging/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anaconda/pyanaconda/packaging/__init__.py b/anaconda/pyanaconda/packaging/__init__.py index 8332ce0..26eb953 100644 --- a/anaconda/pyanaconda/packaging/__init__.py +++ b/anaconda/pyanaconda/packaging/__init__.py @@ -829,7 +829,7 @@ class PackagePayload(Payload): if fnmatch(f, "/boot/vmlinuz-*") or fnmatch(f, "/boot/efi/EFI/%s/vmlinuz-*" % self.instclass.efi_dir))) - return sorted(files, key=functools.cmp_to_key(versionCmp)) + return sorted(set(files), key=functools.cmp_to_key(versionCmp)) @property def rpmMacros(self):