[debhelper-devel] Bug#862334: Bug#862334: dh_installinit automatically add not running content
Steve Langasek
vorlon at debian.org
Thu May 11 16:09:33 UTC 2017
Control: reassign -1 sane-utils
On Thu, May 11, 2017 at 02:46:48PM +0200, Jörg Frings-Fürst wrote:
> Hello,
> saneutils don't use a prerm script.
> dh_installinit add once with the content:
> [quote]
> #!/bin/sh
> set -e
> # Automatically added by dh_installinit
> if [ -x "/etc/init.d/saned" ] && [ "$1" = remove ]; then
> invoke-rc.d saned stop || saned_eh
> fi
> # End automatically added section
> [/quote]
> saned_eh is defined as a function in the postinst script.
debhelper is behaving as instructed. The debian/rules in sane-backends is
telling debhelper to use saned_eh as the 'error handler' for installinit:
override_dh_installinit:
dh_installinit -psane-utils --name=saned --error-handler=saned_eh
The error handler must be available to both postinst and prerm scripts if
you expect it to work.
Of course, 'invoke-rc.d saned stop' should normally succeed, in which case
the script never tries to call saned_eh anyway.
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek at ubuntu.com vorlon at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debhelper-devel/attachments/20170511/41cb4635/attachment-0003.sig>
More information about the debhelper-devel
mailing list