[PATCH v4] templates: introduce GRUB_TOP_LEVEL_* vars

2022-10-17 Thread Denton Liu
A user may wish to use an image that is not sorted as the "latest" version as the top-level entry. For example, in Arch Linux, if a user has the LTS and regular kernels installed, `/boot/vmlinuz-linux-lts` gets sorted as the "latest" compared to `/boot/vmlinuz-linux`. However, a user may wish to us

Re: [PATCH v4] templates: introduce GRUB_TOP_LEVEL_* vars

2022-10-17 Thread Oskari Pirhonen
On Mon, Oct 17, 2022 at 03:35:32 -0700, Denton Liu wrote: > A user may wish to use an image that is not sorted as the "latest" > version as the top-level entry. For example, in Arch Linux, if a user > has the LTS and regular kernels installed, `/boot/vmlinuz-linux-lts` > gets sorted as the "latest"

Re: [PATCH v4] templates: introduce GRUB_TOP_LEVEL_* vars

2022-10-18 Thread Olaf Hering
Mon, 17 Oct 2022 03:35:32 -0700 Denton Liu : > A user may wish to use an image that is not sorted as the "latest" > version as the top-level entry. Correct. What is really required is some form of file pattern matching and to use --id= in "menuentry title" commands. That way one can have the

Re: [PATCH v4] templates: introduce GRUB_TOP_LEVEL_* vars

2022-10-18 Thread Denton Liu
Hi Olaf, On Tue, Oct 18, 2022 at 01:12:35PM +0200, Olaf Hering wrote: > Mon, 17 Oct 2022 03:35:32 -0700 Denton Liu : > > > A user may wish to use an image that is not sorted as the "latest" > > version as the top-level entry. > > Correct. > > What is really required is some form of file patter

Re: [PATCH v4] templates: introduce GRUB_TOP_LEVEL_* vars

2022-10-18 Thread Olaf Hering
Tue, 18 Oct 2022 06:57:36 -0700 Denton Liu : > If I'm understanding correctly, what you're proposing is a mechanism for > setting the default entry. If I'm not mistaken, this seems like an > orthogonal discussion to me. My patch proposes a method of setting the > top-level menu entry while this me

Re: [PATCH v4] templates: introduce GRUB_TOP_LEVEL_* vars

2022-10-18 Thread Denton Liu
Hi Olaf, On Tue, Oct 18, 2022 at 04:18:21PM +0200, Olaf Hering wrote: > I think this can be done already today. At least YaST offers a way to select > a specific item in a submenu and pass it to grub-set-default. This leads to > an entry like this in grubenv: Right, we currently offer the abili

Re: [PATCH v4] templates: introduce GRUB_TOP_LEVEL_* vars

2022-10-18 Thread Michael Chang via Grub-devel
On Tue, Oct 18, 2022 at 04:18:21PM +0200, Olaf Hering wrote: > Tue, 18 Oct 2022 06:57:36 -0700 Denton Liu : > > > If I'm understanding correctly, what you're proposing is a mechanism for > > setting the default entry. If I'm not mistaken, this seems like an > > orthogonal discussion to me. My patc

Re: [PATCH v4] templates: introduce GRUB_TOP_LEVEL_* vars

2022-10-20 Thread Olaf Hering
Tue, 18 Oct 2022 21:53:32 -0700 Denton Liu : > On Tue, Oct 18, 2022 at 04:18:21PM +0200, Olaf Hering wrote: > > Maybe the patch description lacks a specific example how the proposed > > change is supposed to be used in your environment. > My patch description says: > Introduce the GRUB_TO

Re: [PATCH v4] templates: introduce GRUB_TOP_LEVEL_* vars

2022-10-21 Thread Denton Liu
Hi Olaf, On Thu, Oct 20, 2022 at 05:13:06PM +0200, Olaf Hering wrote: > After reading the patch again, the newly added documentation states: > "This option should be a path to a kernel image." > > I think it needs to be more specific: is it expecting an absolute path, or > just the basename of t

Re: [PATCH v4] templates: introduce GRUB_TOP_LEVEL_* vars

2022-10-22 Thread Olaf Hering
Fri, 21 Oct 2022 20:53:36 -0700 Denton Liu : > Thanks for the feedback, it should be an absolute path. I can submit a > new version of the patch later. However, before I do so, are you still > a NAK on the general idea? It is not clear to me how useful it will be in practice. In the end I have no