[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Proposed new POSIX sh policy



On Thu, 16 Nov 2006 18:22:32 -0800, Thomas Bushnell BSG <tb@becket.net> said: 
 
> POSIX does not distinguish at all between the status of echo, ls,
> and test.  It puts them in the same section, talks about them in the
> same terms, and so forth.  In no way does POSIX say or imply that
> the behavior of "test" is a "shell feature" and the behavior of "ls"
> is not.

> So can a Debian shell script use fileutils-specific parts of "ls"?
> If the answer is "sure", then why is "test" not the same?  Where in
> Policy is this explained?

        Your scripts shouuld really just use whatever POSIX mandates
 ls has. Just like it should use whatever POSIX mandates test has.

        Anything over and beyond that, it depends on what the rest of
 Debian is shipping, to see whether or not it works. Why is this so
 hard to understand? Your script ought not to assume facilities beyond
 what it's dependencies say would be present on the disk, and where
 possible, if it is a feature mentioned in SuS3,  be prepared not to
 have specific extensions available.

        Like POSIX, your script ought not to care about where the
 command comes from. If you have depended on debconf, you can rely on
 it present. If something makes debconf not behave like the
 documentation for debconf says it should, that thing is buggy.
 Either there is a bug in debconf, or there is a bug in the shell
 interpreter -- but as a script writer, that is not your problem.

        manoj
-- 
Today is a good day for information-gathering.  Read someone else's
mail file.
Manoj Srivastava <srivasta@debian.org> <http://www.debian.org/~srivasta/>
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C



Reply to: