Re: dpkg can't purge init script
On Wed, Aug 22, 2001 at 07:44:29PM +0200, Eric Van Buggenhaut wrote:
> I can't purge a package :
>
> curitiba_POTATO:/# dpkg --purge superviser-server
> (Reading database ... 9401 files and directories currently installed.)
> Removing superviser-server ...
> Stopping superviser-server: dpkg: error processing superviser-server (--purge):
> subprocess pre-removal script returned error exit status 1
[BTW, should the package be called supervisOr-server?]
So it looks as though the superviser-server init.d stop script exited
with exit status 1 instead of 0.
> Here comes the script :
>
> [eric@curitibaPOTATO:~/arturo/superviser-server-1.0]$ more debian/prerm
> #! /bin/sh
> # prerm script for superviser-server
> #
> # see: dh_installdeb(1)
>
> set -e
so it will exist on any error...
> case "$1" in
> remove|upgrade|deconfigure)
> # install-info --quiet --remove /usr/info/superviser-server.info.gz
> ;;
>
> failed-upgrade)
> ;;
> *)
> echo "prerm called with unknown argument \`$1'" >&2
> exit 0
This should probably be "exit 1".
> ;;
> esac
>
> # dh_installdeb will replace this with shell code automatically
> # generated by other debhelper scripts.
>
> #DEBHELPER#
>
> exit 0
> And the debhelper script :
>
> [eric@curitibaPOTATO:~/arturo/superviser-server-1.0]$ more debian/prerm.debhelper
> # Automatically added by dh_installdocs
> if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/superviser-server ]; then
> rm -f /usr/doc/superviser-server
> fi
> # End automatically added section
OK there.
> # Automatically added by dh_installinit
> /etc/init.d/superviser-server stop
> # End automatically added section
And that's OK, _as long as /etc/init.d/superviser-server stop returns
with a zero exit status_.
> Is this a bug in debhelper ?
Doesn't appear to be. Check that /etc/init.d/superviser-server uses
the correct exit status.
Julian
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Julian Gilbey, Dept of Maths, Queen Mary, Univ. of London
Debian GNU/Linux Developer, see http://people.debian.org/~jdg
Reply to: