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
This commit is contained in:
Marek Marczykowski-Górecki 2018-03-28 02:46:58 +02:00
parent f452cca502
commit 7c67b93468
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -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):