[debian-mysql] Bug#621020: really? (Debian Policy and LSB)

Nicholas Bamber nicholas at periapt.co.uk
Wed Apr 11 20:10:40 UTC 2012


Ah thanks.  YEs that rings a bell now.

On 11/04/12 21:04, Raphael Hertzog wrote:
> Hi,
>
> On Wed, 11 Apr 2012, Nicholas Bamber wrote:
>> Hmm... This contradicts section 6.1 of the Debian policy.
>>
>> "The package management system looks at the exit status from these
>> scripts. It is important that they exit with a non-zero status if
>
> Here "these scripts" refer to "package maintainer scripts"
> ({pre,post}{inst,rm}) and not to "init scripts". So there's no
> contradiction.
>
> The problem of using "set -e" in init script is even documented
> in policy 9.3.2:
> http://www.debian.org/doc/debian-policy/ch-opersys.html#s-writing-init
>
> | Be careful of using set -e in init.d scripts. Writing correct init.d
> | scripts requires accepting various error exit statuses when daemons are
> | already running or already stopped without aborting the init.d script, and
> | common init.d function libraries are not safe to call with set -e in
> | effect[72]. For init.d scripts, it's often easier to not use set -e and
> | instead check the result of each command separately.
> |
> | [72] /lib/lsb/init-functions, which assists in writing LSB-compliant
> | init scripts, may fail if set -e is in effect and echoing status messages
> | to the console fails, for example.
>
> Cheers,






More information about the pkg-mysql-maint mailing list