From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1S4C8s-0005wT-58 for mharc-grub-devel@gnu.org; Sun, 04 Mar 2012 09:10:30 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43916) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4C8p-0005uw-56 for grub-devel@gnu.org; Sun, 04 Mar 2012 09:10:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4C8m-0006CA-E7 for grub-devel@gnu.org; Sun, 04 Mar 2012 09:10:26 -0500 Received: from mail-ee0-f41.google.com ([74.125.83.41]:40944) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4C8m-0006Bx-4y for grub-devel@gnu.org; Sun, 04 Mar 2012 09:10:24 -0500 Received: by eeke53 with SMTP id e53so1213558eek.0 for ; Sun, 04 Mar 2012 06:10:22 -0800 (PST) Received-SPF: pass (google.com: domain of phcoder@gmail.com designates 10.213.13.72 as permitted sender) client-ip=10.213.13.72; Authentication-Results: mr.google.com; spf=pass (google.com: domain of phcoder@gmail.com designates 10.213.13.72 as permitted sender) smtp.mail=phcoder@gmail.com; dkim=pass header.i=phcoder@gmail.com Received: from mr.google.com ([10.213.13.72]) by 10.213.13.72 with SMTP id b8mr1371082eba.150.1330870222150 (num_hops = 1); Sun, 04 Mar 2012 06:10:22 -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=ZZtQz3uUprZg2XOJV/p+TcsE70B1gXplhMLaDVCtmW4=; b=obT7fRlIcypBW7H8lJ7XVTC59BCPaP3ojG/4YPt1LxLtFkUhE3FkmRZYva7voAWq7U vnwFEaKFwCdxYFJYDV73lrrdZSMmSyhBMLe6j6GC6eBRxFLyfHw+QellD+Hz0YfH4wJD HshwY5jv0Cv2Rhp/WSSer3dJX7QZ3pUWiCoIG83vx0WM+7VaHY42B9PbIiJvhI2315Wi 1SuEu07roIqBzHMSrvt0npcH3weOIup1jh1/nmHxc0czvRYSKPWLudcMH+lfHowVU3sS Q1xTeKC7IXEnHr8TRvNYYh7OCo7hanmMXSVqijEz4HRklQiqPEfZMZxrtludBn8G5B1x zGTQ== Received: by 10.213.13.72 with SMTP id b8mr1050065eba.150.1330870222072; Sun, 04 Mar 2012 06:10:22 -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 n55sm8608243eef.6.2012.03.04.06.10.20 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 04 Mar 2012 06:10:21 -0800 (PST) Message-ID: <4F5377CA.4020709@gmail.com> Date: Sun, 04 Mar 2012 15:10:18 +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: Andreas Vogel Subject: Re: [PATCH] Making exported variables really global References: <4F536941.8070805@anvo-it.de> <4F536B8A.6060501@gmail.com> <4F537261.3070402@anvo-it.de> In-Reply-To: <4F537261.3070402@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: 74.125.83.41 Cc: The development of GNU GRUB 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 14:10:28 -0000 On 04.03.2012 14:47, Andreas Vogel wrote: > Am 04.03.2012 14:18, schrieb Vladimir 'φ-coder/phcoder' Serbinenko: >> 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$ >> > I understand your point, but IMHO we do need to be able to set global > vars in submenus, that's my patch about. > > Otherwise how can you use a "Settings..." submenu to configure > environment variables which are used by other menu entries for booting? > The analogy with bash is not useful here. We can add a command with traits of both "menuentry" (same context, same menu) and "submenu" (new context, new menu), sth like submemu_source (same context, new menu) > -- Regards Vladimir 'φ-coder/phcoder' Serbinenko