anaconda: make sure the latest version is placed as xen.efi
os.listdir returns files in filesystem order, not sorted. QubesOS/qubes-issues#2990
This commit is contained in:
parent
e3a4a46958
commit
c834daa176
@ -1857,10 +1857,10 @@ class XenEFI(EFIGRUB):
|
||||
if os.path.exists(xen_efi_target):
|
||||
os.remove(xen_efi_target)
|
||||
|
||||
xen_efi = [x for x in os.listdir(iutil.getSysroot() + self.config_dir) if
|
||||
x.startswith('xen-') and x.endswith('.efi')][0]
|
||||
xen_efi = [x for x in sorted(os.listdir(iutil.getSysroot() + self.config_dir)) if
|
||||
x.startswith('xen-') and x.endswith('.efi')][-1]
|
||||
shutil.copy("{}/{}".format(iutil.getSysroot() + self.config_dir, xen_efi),
|
||||
"{}/{}".format(iutil.getSysroot() + self.config_dir, "xen.efi"))
|
||||
xen_efi_target)
|
||||
rc = self.efibootmgr("-c", "-w", "-L", productName,
|
||||
"-d", boot_disk.path, "-p", boot_part_num,
|
||||
"-l",
|
||||
|
Loading…
Reference in New Issue
Block a user