[master 1/2] Use self.stage1_device where appropriate in EFIGRUB.

David Lehman dlehman at redhat.com
Wed Sep 5 16:54:45 UTC 2012


On Wed, 2012-09-05 at 12:50 -0400, Peter Jones wrote:
> This gets rid of storage references.

Both look okay to me except for one missed change, noted below.

> 
> Related: rhbz#853308
> ---
>  pyanaconda/bootloader.py | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
> index 04b4066..ce12c85 100644
> --- a/pyanaconda/bootloader.py
> +++ b/pyanaconda/bootloader.py
> @@ -1592,15 +1592,14 @@ class EFIGRUB(GRUB2):
>          return ret.replace('/', '\\')
>  
>      def add_efi_boot_target(self):
> -        boot_efi = self.storage.mountpoints["/boot/efi"]
> -        if boot_efi.type == "partition":
> +        if self.stage1_device.type == "partition":
>              boot_disk = boot_efi.disk

You didn't convert boot_efi.disk to self.stage1_device.disk above. Not
worth sending another mail IMO.

> -            boot_part_num = boot_efi.partedPartition.number
> -        elif boot_efi.type == "mdarray":
> +            boot_part_num = self.stage1_device.partedPartition.number
> +        elif self.stage1_device.type == "mdarray":
>              # FIXME: I'm just guessing here. This probably needs the full
>              #        treatment, ie: multiple targets for each member.
> -            boot_disk = boot_efi.parents[0].disk
> -            boot_part_num = boot_efi.parents[0].partedPartition.number
> +            boot_disk = self.stage1_device.parents[0].disk
> +            boot_part_num = self.stage1_device.parents[0].partedPartition.number
>          boot_part_num = str(boot_part_num)
>  
>          rc = self.efibootmgr("-c", "-w", "-L", productName,




More information about the anaconda-patches mailing list