[f21/master] Use first part of Product for UEFI entry (#1128474)
Vratislav Podzimek
vpodzime at redhat.com
Thu Sep 4 08:09:29 UTC 2014
On Wed, 2014-09-03 at 17:21 -0700, Brian C. Lane wrote:
> Otherwise we'll end up with different entries for each product, all
> trying to use the same path. This splits on "-" and uses the first part,
> which should be Fedora or the whole product name if no - are used.
> ---
> pyanaconda/bootloader.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
> index 509796e..7a22d92 100644
> --- a/pyanaconda/bootloader.py
> +++ b/pyanaconda/bootloader.py
> @@ -1699,7 +1699,7 @@ class EFIGRUB(GRUB2):
> except ValueError:
> continue
>
> - if _product == productName:
> + if _product == productName.split("-")[0]:
> slot_id = slot[4:8]
> # slot_id is hex, we can't use .isint and use this regex:
> if not re.match("^[0-9a-fA-F]+$", slot_id):
> @@ -1719,7 +1719,7 @@ class EFIGRUB(GRUB2):
> boot_disk = partition.disk
> boot_part_num = str(partition.partedPartition.number)
>
> - rc = self.efibootmgr("-c", "-w", "-L", productName,
> + rc = self.efibootmgr("-c", "-w", "-L", productName.split("-")[0],
> "-d", boot_disk.path, "-p", boot_part_num,
> "-l",
> self.efi_dir_as_efifs_dir + self._efi_binary,
ACK, but I wonder if it would be worth it to add something like
'productGroup = productName.split("-")[0]'
to our product module and use it here and for the repo names fixed
recently.
--
Vratislav Podzimek
Anaconda Rider | RHCE | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list