Re: Proposed new POSIX sh policy
On Wed, Nov 15, 2006 at 10:05:47PM -0800, Thomas Bushnell BSG wrote:
> On Wed, 2006-11-15 at 22:50 -0600, Manoj Srivastava wrote:
> > I would rather get away from this wording totally.
> > ,----
> > | "Shell scripts specifying /bin/sh as interpreter must only use POSIX
> > | features, additionally, they may assume that echo -n .... . Also,
> > | they may use test -a/o and the local directive in shell functions,
> > | as long as .... If a shell script uses features beyond this set
> > | listed, then the appropriate shell must be specified in the first
> > | line of the script (e.g., #!/bin/bash) and the package must depend on
> > | the package providing the shell (unless the shell package is marked
> > | "Essential", as in the case of bash). "
> > `----
> > This does specify what the scripts may expect, but drops all
> > wording from this section regarding what the policy expectation of
> > /bin/sh is.
> No, this does *not* specify what scripts may expect.
> May I expect test to work with parentheses? If not, it must be because
> 'test ( )' is not a "POSIX feature". And yet, there is nothing in Posix
> which makes test have *anything* to do with the shell particularly. If
> using 'test ( )' is not allowed, because it's not a "POSIX feature",
> then using "debconf" is *also* not allowed, because it is *also* not a
> "POSIX feature". The point is that "POSIX feature" is *not* a
> specification of anything, given the way that POSIX deals with builtins.
Sorry, but that's a strawman, for two reasons. First, POSIX only covers
commands that *are* part of POSIX, it does not specifies that other
commands are illegal. Second of all, debconf does not have a history of
being a builtin, test does.
/) David Weinehall <email@example.com> /) Rime on my window (\
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Diamond-white roses of fire //
\) http://www.acc.umu.se/~tao/ (/ Beautiful hoar-frost (/