Debian Bug report logs - #866297
bible-kjv-text: maintainer script(s) not using strict mode

version graph

Package: bible-kjv-text; Maintainer for bible-kjv-text is Matthew Vernon <[email protected]>; Source for bible-kjv-text is src:bible-kjv (PTS, buildd, popcon).

Reported by: [email protected]

Date: Wed, 28 Jun 2017 19:32:08 UTC

Severity: normal

Found in version bible-kjv/4.29

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to Matthew Vernon <[email protected]>:
Bug#866297; Package bible-kjv-text. (Wed, 28 Jun 2017 19:32:11 GMT) (full text, mbox, link).


Acknowledgement sent to [email protected]:
New Bug report received and forwarded. Copy sent to Matthew Vernon <[email protected]>. (Wed, 28 Jun 2017 19:32:11 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: [email protected]
To: [email protected]
Subject: bible-kjv-text: maintainer script(s) not using strict mode
Date: Wed, 28 Jun 2017 21:02:46 +0200
Package: bible-kjv-text
Version: 4.29
Severity: normal
User: [email protected]
Usertags: colis-shparser

Dear maintainer,

at least one of the maintainer scripts (preinst, postinst, prerm,
postrm) of the package bible-kjv-text does not use strict mode.
Policy section 10.4 says:

"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."

Please insert a "set -e" at the beginning of your script to enable
strict mode. You should not replace this by a first line "#!/bin/sh
-e" as it is not effective when your script is executed by an
explicit invocation of sh.

Note that this might make your script fail in cases where it did not
fail before. This is the purpose of strict mode - make it fail when
any unexpected error is encountered. You should make sure that you
catch any error (non-zero exit codes of commands) that you decide to
tolerate. Techniques to locally catch an error include using
appropriate options to your command when available, adding a " ||
true" at the end of the command, or selectively switching off strict
mode by "set +e" and switching it back on again later by "set -e". 

This bug filing has been discussed and approved in thread [1].

-Ralf.

[1] https://lists.debian.org/debian-devel/2017/06/msg00342.html 



Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Mon May 19 04:38:47 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.