Package: dpkg
Version: 1.13.25
Severity: important

Dear dpkg maintainers,

I was trying to remove `fam' in an Etch chroot, but was blocked by the
following error:

[EMAIL PROTECTED]:/# dpkg --purge fam
(Reading database ... 54012 files and directories currently installed.)
Removing fam ...
Stopping file alteration monitor: FAMstart-stop-daemon: nothing in /proc - not 
mounted? (Success)
invoke-rc.d: initscript fam, action "stop" failed.
dpkg: error processing fam (--purge):
 subprocess pre-removal script returned error exit status 2
Starting file alteration monitor: FAMstart-stop-daemon: nothing in /proc - not 
mounted? (Success)
invoke-rc.d: initscript fam, action "start" failed.
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 2
Errors were encountered while processing:
 fam

The postinst script of fam fails because of invoke-rc.d stop fails:

[EMAIL PROTECTED]:/# more /var/lib/dpkg/info/fam.prerm 
#!/bin/sh
set -e
# Automatically added by dh_installinit
if [ -x "/etc/init.d/fam" ]; then
        if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
                invoke-rc.d fam stop || exit $?
        else
                /etc/init.d/fam stop || exit $?
        fi
fi
# End automatically added section

invoke-rc.d fails because /etc/init.d/fam uses start-stop-daemon, that does not
realise that fam is not running and fails later trying to stop it.

casee "$1" in
  start)
        log_daemon_msg "Starting $DESC" "$NAME"
        start-stop-daemon --start --quiet --exec $DAEMON -- $FAMOPTS
        log_end_msg $?
        ;;
  stop)
        log_daemon_msg "Stopping $DESC" "$NAME"
        start-stop-daemon --stop --oknodo --quiet --exec $DAEMON
        log_end_msg $?
        ;;


The consequence of this is that it is difficult to remove not runnign daemons 
on Debian.


Apparently, fam uses templates from dh-make and debhelper, so the bug may be
that the template is wrong if the behaviour of start-stop-daemon is right...

Have a nice day,

-- 
Charles Plessy
Tsurumi, Kanagawa, Japan



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to