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

Bug#580249: lintian: maintainer-script-without-set-e postinst (possible false positive)



"Adam D. Barratt" <adam@adam-barratt.org.uk> writes:

> On Tue, May 4, 2010 18:51, Jari Aalto wrote:
>
>> This message:
>>
>>      P: xtrlock: maintainer-script-without-set-e postinst
>>
>> Compare the file content:
>>
>>      $ nl -ba debian/postinst
>>      1  #!/bin/sh -e
>
> This is in fact exactly the style of code that the tag is trying to
> persuade you /not/ to write.  The full description of the tag is:
>
> The maintainer script passes -e to the shell on the #! line rather than
> using set -e in the body of the  script.  This is fine for normal
> operation, but if the script is run by-hand with sh /path/to/script
> (common in debugging), -e will not be in effect.  It's therefore better to
> use set -e in the body of the script.

I see, thanks[*]. But, could you consider changing the tag:

    maintainer-script-without-set-e

to, something:

    maintainer-script-without-or-dangerous-set-e

Because the plain "without" is a little spartan in this case,
Jari

[*] The example was from the NMUd package.




Reply to: