Package: debhelper Version: 5.0.26 Severity: important Since the fix to #337664, the prerm code generated by dh_installinit contains:
if [ -x "/etc/init.d/shishid" ]; then if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d shishid stop || exit $? else /etc/init.d/shishid stop || exit $? fi fi The problem is that most init scripts, following the standard templates, contain code like this: stop) echo -n "Stopping $DESC: " start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ --exec $DAEMON echo "$NAME." ;; and uses set -e, which exits 1 if the daemon isn't running. If the package is new enough that both the old and the new prerm scripts contain the new dh_installinit code that checks exit status, an upgrade fails if the daemon isn't running because both prerm scripts fail. Worse, if the daemon is sufficiently broken that it cannot be started, it's almost impossible to clean up the package since both upgrades and purges fail. I had to delete the init script and then use dpkg --purge --force-remove-reinstreq. I'm not sure if the stop action should really fail if the daemon isn't running, but I expect there are a ton of init scripts out there that behave this way since it's been the template for a long time. I think the error handler for the prerm scripts installed by dh_installinit needs to be || true instead of || exit $? for stop actions (but the fix is still valid for the start actions). -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.15-1-686 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages debhelper depends on: ii binutils 2.16.1cvs20060117-1 The GNU assembler, linker and bina ii coreutils [fileutils 5.94-1 The GNU core utilities ii dpkg-dev 1.13.18 package building tools for Debian ii file 4.17-1 Determines file type using "magic" ii html2text 1.3.2a-3 An advanced HTML to text converter ii perl 5.8.8-4 Larry Wall's Practical Extraction ii po-debconf 1.0 manage translated Debconf template debhelper recommends no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]