>>"Clint" == Clint Adams <[EMAIL PROTECTED]> writes: >> The policy explicitly mentions that set -e is to be used. Have >> we collectively taken leave of common sense?
Clint> No, it mentions that set -e SHOULD be used in some cases. The fact that Clint> it mentions /bin/sh in context with 'set -e' might be a bit confusing, Clint> but I don't think that that overrides the declaration that #!/bin/sh Clint> scripts MUST not use set -e. Show me. Which section? >> For the former. For the latter, if it really confuses soemone >> whether set -e is to be used or not, I suggest they stop >> being a developer and take up some other hobby, like being a lawyer. Clint> There's no confusion. set -e is expressly forbidden. You keep asserting this, with no supporting evidence. 2.4.5. Error trapping in makefiles ---------------------------------- Every time you put more than one shell command (this includes using a loop) in a makefile command you must make sure that errors are trapped. For simple compound commands, such as changing directory and then running a program, using `&&' rather than semicolon as a command separator is sufficient. For more complex commands including most loops and conditionals you should include a separate `set -e' command at the start of every makefile command that's actually one of these miniature shell scripts. 6.1. Introduction to package maintainer scripts ----------------------------------------------- The package management system looks at the exit status from these scripts. It is important that they exit with a non-zero status if there is an error, so that the package management system can stop its processing. For shell scripts this means that you _almost always_ need to use `set -e' (this is usually true when writing shell scripts, in fact). It is also important, of course, that they don't exit with a non-zero status if everything went well. 11.4. Scripts ------------- Shell scripts (`sh' and `bash') should almost certainly start with `set -e' so that errors are detected. Every script should use `set -e' or check the exit status of _every_ command. Clint> Perhaps those persons who prefer forbidding something while Clint> claiming that common sense allows it, to achieving some sort Clint> of consistency, should become lawyers or perhaps government Clint> officials. Back it up, buddy. Where is your proof? I have given three explicit references from policy strongly recommending set -e. Where the heck is it forbidden? manoj -- This is a logical analogy too... anyone who's been around, knows the world is run by paenguins. Always a paenguin behind the curtain, really getting things done. And paenguins in politics--who can deny it? Kevin M. Bealer, commenting on the penguin Linux logo Manoj Srivastava <[EMAIL PROTECTED]> <http://www.debian.org/%7Esrivasta/> 1024R/C7261095 print CB D9 F4 12 68 07 E4 05 CC 2D 27 12 1D F5 E8 6E 1024D/BF24424C print 4966 F272 D093 B493 410B 924B 21BA DABB BF24 424C -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]