From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1MY0Xh-0004g9-Ps for garchives@archives.gentoo.org; Mon, 03 Aug 2009 16:37:46 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DB91CE031A; Mon, 3 Aug 2009 16:37:44 +0000 (UTC) Received: from QMTA06.westchester.pa.mail.comcast.net (qmta06.westchester.pa.mail.comcast.net [76.96.62.56]) by pigeon.gentoo.org (Postfix) with ESMTP id B4A80E031A for ; Mon, 3 Aug 2009 16:37:44 +0000 (UTC) Received: from OMTA19.westchester.pa.mail.comcast.net ([76.96.62.98]) by QMTA06.westchester.pa.mail.comcast.net with comcast id PnQB1c00627AodY56sdlDQ; Mon, 03 Aug 2009 16:37:45 +0000 Received: from ajax.firstbooks ([68.42.187.112]) by OMTA19.westchester.pa.mail.comcast.net with comcast id PsgS1c00G2Rw5443fsgSBZ; Mon, 03 Aug 2009 16:40:26 +0000 Date: Mon, 3 Aug 2009 12:37:11 -0400 From: Frank Peters To: gentoo-amd64@lists.gentoo.org Subject: Re: [gentoo-amd64] Eselect Syntax Bug? Message-Id: <20090803123711.621097d8.frank.peters@comcast.net> In-Reply-To: <20090803121751.ccc23314.frank.peters@comcast.net> References: <20090803100425.e83801b8.frank.peters@comcast.net> <87k51lt1k4.fsf@phoenix.asynchronous.org> <20090803121751.ccc23314.frank.peters@comcast.net> X-Mailer: Sylpheed 2.7.0 (GTK+ 2.16.5; x86_64-unknown-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-amd64@lists.gentoo.org Reply-to: gentoo-amd64@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: dc834f18-99a6-4cbe-86dc-5690a6c984a5 X-Archives-Hash: 3a929d1c2b3e38b72c3ec2a45206fd54 On Mon, 3 Aug 2009 12:17:51 -0400 Frank Peters wrote: > These lines encapsulate the problem with > the eselect code. > > > #! /bin/bash > function-one() > { > echo "FOOBAR" > } > function-one > > > This code fails on my system. In fact, I booted into my old system, > a non-gentoo system, and the code also failed. However, after booting > into a Linux rescue disk, that runs from a CD and ramdisk, the code does > not fail. (All bash versions were 4.x.) > > I am responding to my own message. The code fails on some systems and succeeds on other systems. Why? The answer may not be important. The code seems to be an example of poor practice. Check out the second entry at this link: http://tldp.org/LDP/abs/html/gotchas.html If the above code is re-written to remove the hyphens and replace them with underscores, it will not fail on any system. Thus, the eselect developers should re-write their variables using underscores and the problem will disappear for everyone. Frank Peters