Re: Proposed new POSIX sh policy
On Sun November 19 2006 15:59, Thomas Bushnell BSG wrote:
> On Sun, 2006-11-19 at 15:47 -0700, Bruce Sass wrote:
> > > Posix puts grep, ls, kill, test, and echo all in *exactly the
> > > same category*. So why does posh treat them so differently?
> > In the case of ls, because the author "cannot think of a legitimate
> > reason for anyone to use ls in a shell script", and he thinks "it
> > would add little value." Presumably grep is in the same boat.
> Care to know how many scripts in Debian call grep? I checked. It's
> not a small number.
looks like I presumed wrong for grep, eh
> > > Why is
> > > catching non-Posix uses of test and echo important, and non-Posix
> > > uses of ls grep not important?
> > I would expect that sh scripts which use non-spec'd features of ls
> > or grep would be open to receiving bug reports for violating
> > Policy. Why do you think that is not the case?
> Because Policy does not mandate compliance with arbitrary Posix
How can a POSIX implementation be anything but non-arbitrary.
> It mandates this only for the shell,
no, for scripts using #!/bin/sh
> under the
> illusion (apparently) that there is some sense to saying "you can
> only use Posix shell features" and "you are free to use Debian
> features of Debian programs".
There is some sense to saying "you can only use Posix features when the
spec includes the commands the features are part of" and "you are free
to use Debian features of Debian programs".
> The fact that the shell does not happen to declare any random Debian
> command as a builtin, and then do something weird with it, is also a
> non-spec'd feature of the shell. So by your reasoning there is
> almost no #!/bin/sh shell script in Debian which does not violate
No, by my reasoning, commands not covered by the spec can not violate
> Clearly Policy must not be read in such a way that nearly every
> script violates it.
Exactly, so why do you read Policy with respect to Debian features not
covered by the spec as doing so?