From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1S4BKH-0001n4-Kf for mharc-grub-devel@gnu.org; Sun, 04 Mar 2012 08:18:13 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4BKF-0001my-Es for grub-devel@gnu.org; Sun, 04 Mar 2012 08:18:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4BKD-0005cb-Pw for grub-devel@gnu.org; Sun, 04 Mar 2012 08:18:11 -0500 Received: from mail-ey0-f169.google.com ([209.85.215.169]:63350) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4BKD-0005cS-Gx for grub-devel@gnu.org; Sun, 04 Mar 2012 08:18:09 -0500 Received: by eaal1 with SMTP id l1so1159593eaa.0 for ; Sun, 04 Mar 2012 05:18:07 -0800 (PST) Received-SPF: pass (google.com: domain of phcoder@gmail.com designates 10.14.182.194 as permitted sender) client-ip=10.14.182.194; Authentication-Results: mr.google.com; spf=pass (google.com: domain of phcoder@gmail.com designates 10.14.182.194 as permitted sender) smtp.mail=phcoder@gmail.com; dkim=pass header.i=phcoder@gmail.com Received: from mr.google.com ([10.14.182.194]) by 10.14.182.194 with SMTP id o42mr5434540eem.50.1330867087543 (num_hops = 1); Sun, 04 Mar 2012 05:18:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=7eqOhb/WbDBek4n5KalhC4/eJvuT36V0yJg+cR1IneE=; b=A4xtTbciR77Pj+OeUBCjMBCkrWFoCyN/m+r5DCGKAjHRCXHUwu31TGYAGvTXXGxrEY PC4ySnQOFjGFJxX8gDdfHOPiC81QAUaaT6vX4Toifn5Nci6Guf9AyOHga8LGNoYvEiLh EhJVWKPVijYJtrgSfexyaGi41Cmo0cHnD58r+/2lx97Mugk9MqnBes9ufANXNtM2dRbx BhIfgE2UTRcQ3RvAifhl5KyX45IluV2OTlvuBIldIZH47ts2lIH0Wb2KeZoCoo8gdxZ6 sQJ3RW8OCSoD7CPzZ7A0enoFWyF2gq3x+R7S01qSREhrpBuPATQUVpH3fRoGWuFgWbDz K5NQ== Received: by 10.14.182.194 with SMTP id o42mr4127042eem.50.1330867087473; Sun, 04 Mar 2012 05:18:07 -0800 (PST) Received: from debian.x201.phnet (220-15.62-81.cust.bluewin.ch. [81.62.15.220]) by mx.google.com with ESMTPS id d54sm2054447eei.9.2012.03.04.05.18.05 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 04 Mar 2012 05:18:06 -0800 (PST) Message-ID: <4F536B8A.6060501@gmail.com> Date: Sun, 04 Mar 2012 14:18:02 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20120216 Icedove/8.0 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH] Making exported variables really global References: <4F536941.8070805@anvo-it.de> In-Reply-To: <4F536941.8070805@anvo-it.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.215.169 Cc: Andreas Vogel X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 13:18:12 -0000 On 04.03.2012 14:08, Andreas Vogel wrote: > Hi all, > > This tiny patch makes exported variables really global. Right now > exported variables are set in the context of a submenu when running it. > But any changes to those vars are lost when leaving the submenu. This > patch sets and exports all vars in the calling context for the submenu > which are exported in the context of the submenu. We follow the bash behaviour. And the bash behaviour is exactly what GRUB does: phcoder@debian.x201.phnet:14:15:11:~/grub2/bzr/mainline$ bash phcoder@debian.x201.phnet:14:15:15:~/grub2/bzr/mainline$ export XYZ=x phcoder@debian.x201.phnet:14:15:19:~/grub2/bzr/mainline$ exit phcoder@debian.x201.phnet:14:15:20:~/grub2/bzr/mainline$ echo $XYZ phcoder@debian.x201.phnet:14:15:24:~/grub2/bzr/mainline$ -- Regards Vladimir 'φ-coder/phcoder' Serbinenko