[Pkg-openldap-devel] Bug#596100: When told not to initially configure slapd, (un-)installation fails due to init script return code.

Steve Langasek vorlon at debian.org
Wed Sep 8 19:15:56 UTC 2010


tags 596100 - patch
severity 596100 serious
thanks

On Wed, Sep 08, 2010 at 05:46:49PM +0100, Matthew King wrote:

> Attempting to immediately remove the package also fails hard.

> aginor:~# dpkg --purge slapd
> (Reading database ... 24183 files and directories currently installed.)
> Removing slapd ...
> No configuration file was found for slapd at /etc/ldap/slapd.d. ... (warning).
> invoke-rc.d: initscript slapd, action "stop" failed.
> dpkg: error processing slapd (--purge):
>  subprocess installed pre-removal script returned error exit status 1
>   Backing up /etc/ldap/slapd.d in /var/backups/slapd-... done.
> grep: /etc/ldap/slapd.d/cn=config/olcDatabase*: No such file or directory
> No configuration file was found for slapd at /etc/ldap/slapd.d. ... (warning).
> invoke-rc.d: initscript slapd, action "start" failed.
> dpkg: error while cleaning up:
>  subprocess installed post-installation script returned error exit status 1
> Errors were encountered while processing:
>  slapd
> aginor:~#

> The included patch solves this by:

> 1) Creating /etc/ldap/noslapd as part of the postinst which the administrator
>    can remove when slapd is configured.

I don't consider this appropriate.  If you ask not to automatically
configure slapd, then the package is not usable until manual action is taken
and we should not mark the package as "installed".

We should, however, ensure that removing the package does not fail when it's
unconfigured.  This is a policy violation in the init script, policy
requires the init script to return success when 'stop' is called for a
service that isn't running.

-- 
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: not available
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-openldap-devel/attachments/20100908/a8a2d3d9/attachment.pgp>


More information about the Pkg-openldap-devel mailing list