On Tue, Jun 26, 2018 at 10:38 PM, Javier Martinez Canillas
<javier(a)dowhile0.org> wrote:
On Tue, Jun 26, 2018 at 5:36 PM, Javier Martinez Canillas
<javier(a)dowhile0.org> wrote:
> On Tue, Jun 26, 2018 at 4:33 PM, Peter Jones <pjones(a)redhat.com> wrote:
[snip]
>>
>>> It attempts to sort using the id field, and if this isn't defined
>>> other fields are used as fallback in the following order: version,
>>> title, linux.
>>
>> Yeah, so maybe we want to make that:
>>
>> version, id, <config file name>, title, linux
>>
>
> Yes, although it probably should be:
>
> <config file name>, id, version, title, linux
>
Ok, I noticed that said something stupid here. The filename is the
only thing expected to be unique so there's no point to use anything
as a fallback for it. So either we should only use the file name to
sort or it should be the last thing used.
I propose to just do: version, <config file name>
and use the config file name (without the .conf) as the grub2 menu
entry id and drop the id field since it won't be needed anymore.
That way it will cover ostree case (version has precedence over
filename) and all bootloaders will use the file name to sort.
Alternatively we can just use the file name and change ostree to use
the version instead of the index as its trailing number.
I've discussed with Colin and he agreed for ostree to use
ostree-$version-$ID-$VARIANT_ID.conf as filename, I've made that
change in [0].
That means that now both Fedora CoreOS and classic Fedora will have
BLS filenames that can be used as sort criteria. So I've proposed a
change [1] for our grub2 to just search by the BLS filename and use it
as the menu entry id, dropping the separate id field as suggested by
Zbyszek.
[0]:
https://github.com/ostreedev/ostree/pull/1654
[1]:
https://github.com/rhboot/grub2/pull/18
Best regards,
Javier