Gentoo Archives: gentoo-amd64

From: Frank Peters <frank.peters@×××××××.net>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Eselect Syntax Bug?
Date: Mon, 03 Aug 2009 16:37:46
Message-Id: 20090803123711.621097d8.frank.peters@comcast.net
In Reply to: Re: [gentoo-amd64] Eselect Syntax Bug? by Frank Peters
1 On Mon, 3 Aug 2009 12:17:51 -0400
2 Frank Peters <frank.peters@×××××××.net> wrote:
3
4
5 > These lines encapsulate the problem with
6 > the eselect code.
7 >
8 >
9 > #! /bin/bash
10 > function-one()
11 > {
12 > echo "FOOBAR"
13 > }
14 > function-one
15 >
16 >
17 > This code fails on my system. In fact, I booted into my old system,
18 > a non-gentoo system, and the code also failed. However, after booting
19 > into a Linux rescue disk, that runs from a CD and ramdisk, the code does
20 > not fail. (All bash versions were 4.x.)
21 >
22 >
23
24 I am responding to my own message.
25
26 The code fails on some systems and succeeds on other systems. Why?
27
28 The answer may not be important. The code seems to be an example
29 of poor practice. Check out the second entry at this link:
30
31 http://tldp.org/LDP/abs/html/gotchas.html
32
33 If the above code is re-written to remove the hyphens and replace
34 them with underscores, it will not fail on any system.
35
36 Thus, the eselect developers should re-write their variables using
37 underscores and the problem will disappear for everyone.
38
39 Frank Peters