From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1mO3Bu-0000E8-94 for mharc-grub-devel@gnu.org; Wed, 08 Sep 2021 15:25:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mO3Bt-0000Ds-63 for grub-devel@gnu.org; Wed, 08 Sep 2021 15:25:01 -0400 Received: from dibed.net-space.pl ([84.10.22.86]:33594) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_3DES_EDE_CBC_SHA1:192) (Exim 4.90_1) (envelope-from ) id 1mO3Br-0005LG-Lv for grub-devel@gnu.org; Wed, 08 Sep 2021 15:25:00 -0400 Received: from router-fw.i.net-space.pl ([192.168.52.1]:48680 "EHLO tomti.i.net-space.pl") by router-fw-old.i.net-space.pl with ESMTP id S2114413AbhIHTYy (ORCPT ); Wed, 8 Sep 2021 21:24:54 +0200 X-Comment: RFC 2476 MSA function at dibed.net-space.pl logged sender identity as: dkiper Date: Wed, 8 Sep 2021 21:24:51 +0200 From: Daniel Kiper To: Dimitri John Ledkov , olaf@aepfle.de Cc: The development of GNU GRUB , phcoder@gmail.com Subject: Re: submenu fails to see variables Message-ID: <20210908192451.osdenmzsqubv3vzg@tomti.i.net-space.pl> References: <20210906124637.48eb8af5.olaf@aepfle.de> <20210907093001.GA19874@aepfle.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Received-SPF: pass client-ip=84.10.22.86; envelope-from=dkiper@net-space.pl; helo=dibed.net-space.pl X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2021 19:25:01 -0000 On Tue, Sep 07, 2021 at 11:54:13AM +0100, Dimitri John Ledkov wrote: > On Tue, Sep 7, 2021 at 10:30 AM Olaf Hering wrote: > > > > On Mon, Sep 06, Vladimir 'phcoder' Serbinenko wrote: > > > > > Le lun. 6 sept. 2021 à 12:49, Olaf Hering 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. I would prefer to keep behavior as is and document it. Dimitri, Olaf, could one of you do it? Daniel