Revert "anaconda: workaround efibootmgr bug (SIGABRT while removing entries)"

This reverts commit bdba0f99d0.

The workaround is not needed anymore - efibootmgr is new enough.
This commit is contained in:
Marek Marczykowski-Górecki 2016-05-17 14:18:19 +02:00
parent 76e5589adf
commit b7d9d54a1e
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -1721,22 +1721,12 @@ class EFIGRUB(GRUB2):
def remove_efi_boot_target(self):
buf = self.efibootmgr(capture=True)
bootorder = None
for line in buf.splitlines():
try:
(slot, _product) = line.split(None, 1)
except ValueError:
continue
# Workaround for bug in efibootmgr that causes abort() when
# removing an entry not present in BootOrder.
# This is already fixed in efibootmgr-0.12, so can be removed when
# we upgrade it one day
# The fix (with bug details):
# https://github.com/rhinstaller/efibootmgr/commit/f575bf87
if slot == "BootOrder:":
bootorder = _product
if _product == productName.split("-")[0]:
slot_id = slot[4:8]
# slot_id is hex, we can't use .isint and use this regex:
@ -1744,11 +1734,6 @@ class EFIGRUB(GRUB2):
log.warning("failed to parse efi boot slot (%s)", slot)
continue
if bootorder.count(slot_id) == 0:
rc = self.efibootmgr("-o", bootorder + "," + slot_id)
if rc:
raise BootLoaderError("failed to update BootOrder while removing old boot entry")
rc = self.efibootmgr("-b", slot_id, "-B",
root=iutil.getSysroot())
if rc: