You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qubes-installer-qubes-os/anaconda/0035-anaconda-xen.efi-upgra...

43 lines
1.9 KiB

From 5c3b0d8d2319f323d5437bf51356b2988262e84f Mon Sep 17 00:00:00 2001
From: Freddie Rice <freddie.rice@gmail.com>
Date: Fri, 19 Oct 2018 08:02:12 +0200
Subject: [PATCH] anaconda: xen.efi upgraded during each install
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Frédéric Pierret <frederic.epitre@orange.fr>
---
pyanaconda/bootloader.py | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index b1e9ff421..27c7ed34a 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1851,12 +1851,15 @@ class XenEFI(EFIGRUB):
boot_part_num = self.stage1_device.parents[0].parted_partition.number
boot_part_num = str(boot_part_num)
- if not os.path.exists(
- "{}/{}".format(iutil.getSysroot() + self.config_dir, "xen.efi")):
- xen_efi = [x for x in os.listdir(iutil.getSysroot() + self.config_dir) if
- x.startswith('xen-') and x.endswith('.efi')][0]
- shutil.copy("{}/{}".format(iutil.getSysroot() + self.config_dir, xen_efi),
- "{}/{}".format(iutil.getSysroot() + self.config_dir, "xen.efi"))
+ # could be an old version, replace in case
+ xen_efi_target = "{}/{}".format(iutil.getSysroot() + self.config_dir, "xen.efi")
+ 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]
+ shutil.copy("{}/{}".format(iutil.getSysroot() + self.config_dir, xen_efi),
+ "{}/{}".format(iutil.getSysroot() + self.config_dir, "xen.efi"))
rc = self.efibootmgr("-c", "-w", "-L", productName,
"-d", boot_disk.path, "-p", boot_part_num,
"-l",
--
2.14.4