El 25/01/16 a las 16:12, Michal Suchanek escribió:
On 25 January 2016 at 03:05, adrian15 <adrian15...@gmail.com> wrote:
El 24/01/16 a las 16:51, Michal Suchanek escribió:

What you are describing here is what it's actually implemented in my patch
(Well, actually the first patch version because the current one enforces
bootloader roles).

Actually, no.

Nowhere in the description is any bootloader designated primary or
secondary or first or second. On purpose.
Neither it is on my patch (initial implementation). Yes, the term PRIMARY_BOOTLOADER is used there for reusing old code. But using:

--bootloaders=syslinux,grub-efi

did not enforce syslinux to be in the first place or grub-efi to be in the second place.

That's the specific part I meant.


So what about primary and secondary terms? Or first or
second terms?

Both are broken and confusing.
Ok...

These terms are used in two places:
* Internal variables and functions to handle bootloaders
* Information shown to the final user

I'm most convinced to use the first and non-first notation. So that the old
code that referred to LB_BOOTLOADER can just refer to: LB_FIRST_BOOTLOADER.

For what piece of code we have does it make sense to reference
LB_FIRST_BOOTLOADER when not also referencing LB_SECOND_BOOTLOADER?
Will that be extended to LB_THIRD_BOOTLOADER once x86 grows support
for coreboot or l-b grows support for some other platform with many
firmware variants?

If you set bootloaders like

LB_BOOTLOADERS="syslinux grub-efi"

then you can just do

for bootloader in $LB_BOOTLOADERS ; do some $bootloader foo
Mostly what current path does but with commas instead.

after you check that you have at most two bootloaders and if you have
more than one then only the latter one ends with -efi.

This is not a good approach. You are requesting the bootloaders to end in "-efi". The current approach is to name them based on the Debian package name. These packages do not need to end in "-efi".

My use case is the following one. The final user requests:

--bootloaders=grub-efi,syslinux

so I show him:

"Warning. You are using: syslinux as a non first bootloader. This might work but it is not advised."

How do I know that I have to output this message?

Because I compare the internal variable:

LB_FIRST_BOOTLOADER="grub-efi"

with the bootloader name "syslinux" and I see they are not the same one.

So, as you see I need to use:

"non first bootloader" term
and
LB_FIRST_BOOTLOADER variable.

So...

1) I don't mind renaming "non first bootloader" or LB_FIRST_BOOTLOADER to another terminology which makes more technical sense. 2) I prefer this approach over yours (Michal) because it's the own bootloader which decides if it is more suited for "first bootloader" or not. Let's not repeat the current binary_iso design which has many references to the different available binary_bootloaders available.


Thanks

Michal

adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/

Reply via email to