Bug#349010: debian-policy: Chapter 6 - Package maintainer scripts: redundant info about exit status
Package: debian-policy
Severity: minor
Section 6.1, third paragraph, says that maintainer scripts, should exit
with non-zero on error. Then section 6.3 (titled "Controlling terminal
for maintainer scripts"), says: "Each script should return a zero exit
status for success, or a nonzero one for failure."
First, I don't think this has anything to do with the controlling
terminal. Second, this info should be regrouped in one place (not merely
delete the second one, because the first one does not explicitely say it
should be zero on success). Maybe the best would be to create a new
section, just after the introduction. Proposal:
6.2 Exit status
The package management system looks at the exit status from these
scripts. Each script must return a zero exit status for success,
or a nonzero one for failure.
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.
Feel free to adjust. Note that I replaced the "should return..." by
"must return..." as I think it is a requirement, but undo that if I am
wrong, AINAPE (policy expert!).
Cheers,
Daniel
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (900, 'testing'), (99, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Reply to:
- Prev by Date:
Re:
- Next by Date:
Leslie
- Previous by thread:
Re:
- Next by thread:
Leslie
- Index(es):