All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: submenu fails to see variables
Date: Tue, 7 Sep 2021 11:54:13 +0100	[thread overview]
Message-ID: <CADWks+Ziy_XEXR3U2hoNx1Uzqf9rRhGBOjU3c4q3kSQHK4bLpw@mail.gmail.com> (raw)
In-Reply-To: <20210907093001.GA19874@aepfle.de>

On Tue, Sep 7, 2021 at 10:30 AM Olaf Hering <olaf@aepfle.de> wrote:
>
> On Mon, Sep 06, Vladimir 'phcoder' Serbinenko wrote:
>
> > Le lun. 6 sept. 2021 à 12:49, Olaf Hering <olaf@aepfle.de> a écrit :
> >     For some reason global variables are not seen in a submenu {} section.
> >     Does anyone happen to know why this behavior is useful?
> > You need to export variable to make it visible in submenu
>
> Thanks. This was less than obvious. I did not expect a command named 'export' in the context of grub.
>
> The documentation needs to be updated to state what the difference between 'set key=val', 'export key=val' and plain 'key=val' actually is.

I have seen somewhere that some distros applied a patch to simply
export all variables always; or like not to create new contexts for
submenus, to keep the variable space the same.

Imho keeping variable space global, and exported by default seems to
lead to least surprises. But it is a behaviour change/break.


  reply	other threads:[~2021-09-07 10:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-06 10:46 submenu fails to see variables Olaf Hering
2021-09-06 13:39 ` Vladimir 'phcoder' Serbinenko
2021-09-07  9:30   ` Olaf Hering
2021-09-07 10:54     ` Dimitri John Ledkov [this message]
2021-09-08 19:24       ` Daniel Kiper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADWks+Ziy_XEXR3U2hoNx1Uzqf9rRhGBOjU3c4q3kSQHK4bLpw@mail.gmail.com \
    --to=dimitri.ledkov@canonical.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.