Gentoo Archives: gentoo-dev

From: Steve Long <slong@××××××××××××××××××.uk>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: POSIX shell and "portable"
Date: Sat, 03 Nov 2007 16:19:05
Message-Id: fgi6rd$fbk$1@ger.gmane.org
In Reply to: Re: [gentoo-dev] POSIX shell and "portable" by Roy Marples
1 Roy Marples wrote:
2
3 > On Sat, 2007-11-03 at 01:19 +0100, Fabian Groffen wrote:
4 >> Please stop calling it "more portable". The shell code you see in
5 >> configure can in a way be called "portable". Your POSIX compliant stuff
6 >> isn't. In fact, by stating #!/bin/sh you actually make the code useless
7 >> on a number of platforms, where it would have been working fine if there
8 >> just were #!/bin/bash there.
9 >>
10 >> It seems to me that you actually mean "more FreeBSD-able" or something,
11 >> which is a high price to pay for a relatively small part of Gentoo as a
12 >> whole.
13 >
14 > Another way of looking at it is that you're forcing specific tools on
15 > people, where I am asking people to use standard POSIX tools.
16 >
17 No, you're waging a campaign to get all Gentoo ebuilds in sh, by pointing
18 out how certain constructs can be rewritten in sh. If your campaign is
19 successful, all Gentoo devs will be forced to write in sh. Saying it's
20 standard when the standard is a) pretty old and b) pretty minimalistic
21 doesn't make it a tool "that's up to the job".
22
23 > I guess it's because I'm an Engineer and you probably aren't. If the
24 > tool isn't up to the job, then fix the tool. If the tool doesn't claim
25 > any standards compliance then feel free to change it.
26 >
27 Er there are two conflicting statements there. The *standard* isn't up to
28 the job, in that use of the sh syntax you promote leads to longer
29 maintenance times and increased likelihood of bugs, since the code is
30 counter-intuitive (aka fugly ;)
31
32 As Mr Copa said "bash itself is portable."
33
34 As a _software_ engineer I am vehemently opposed for the reasons given. The
35 reason for my vehemence is that I don't want to see Gentoo devs spending
36 extra time working around limitations in sh (which is a *base* standard)
37 when really there are /far/ better technical ways round getting, say,
38 ebuilds installed on a Linux Phone (and I have seen *no* other use-case
39 which merits use of sh in package management; it's hardly our core
40 user-base, is it?)
41
42
43 --
44 gentoo-dev@g.o mailing list