Package: slapd
Version: 2.4.44+dfsg-1

Preparing to unpack .../slapd_2.4.44+dfsg-5+deb9u1_amd64.deb ...
Saving current slapd configuration to /var/backups/slapd-2.4.44+dfsg-5...
slapcat: bad configuration directory!
dpkg: error processing archive 
/var/cache/apt/archives/slapd_2.4.44+dfsg-5+deb9u1_amd64.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
 Backing up /etc/ldap/slapd.d in /var/backups/slapd-2.4.44+dfsg-5+deb9u1... 
done.

The ppolicy upgrade check (for upgrades from pre-2.4.43) wants to slapcat the config database so that it can check for an instance of ppolicy, but an empty directory is not a valid config.

I guess the only sane thing to do there is ignore slapcat failure. The service won't start if the config is broken, but it might be disabled another way, and shouldn't prevent upgrading slapd (might be required in order to upgrade unrelated packages).

Should avoid dump_config at all in preinst if we don't actually need it, but that's an optimization rather than a bugfix.

Reply via email to