[f21/master] Use first part of Product for UEFI entry (#1128474)

Brian C. Lane bcl at redhat.com
Thu Sep 4 15:01:37 UTC 2014


On Thu, Sep 04, 2014 at 10:09:29AM +0200, Vratislav Podzimek wrote:
> 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.

Good idea, I'll do that as a followup patch.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)


More information about the anaconda-patches mailing list