Control: tag -1 - moreinfo On 26/08/2019 14.29, Christoph Berg wrote: > Re: Andreas Beckmann 2019-08-25 > <156677006728.19083.14847313544790792807.report...@zam581.zam.kfa-juelich.de> >> during a test with piuparts I noticed your package failed to purge. >> According to policy 7.2 you cannot rely on the depends being available >> during purge, only the essential packages are available for sure. > >> + RET=10 postgresql-9.4/postrm_purge_data doesn't exist >> + return 10 >> dpkg: error processing package postgresql-9.4 (--purge): >> subprocess installed post-removal script returned error exit status 10 >> Errors were encountered while processing: >> postgresql-9.4 >> >> The template does not get registered because postinst does not load >> /usr/share/debconf/confmodule. >> In buster this is done by /usr/share/postgresql-common/maintscripts-functions >> but in jessie the postinst has to do it manually
I can only reproduce this in jessie-lts, plain jessie works fine. But looking at the diff between the logs, 9.4.18-0+deb8u1 does not seem to use debconf at all. > Hmm. It's true that jessie's > /usr/share/postgresql-common/maintscripts-functions doesn't have the > code, but even with jessie's version, I can't reproduce the problem. > After installing postgresql-9.4, debconf-get-selections has [1] > > # PostgreSQL-Verzeichnisse entfernen, wenn das Paket endgültig gelöscht wird? > postgresql-9.4 postgresql-9.4/postrm_purge_data boolean true that is missing for me are you sure that was not there already before the installation? > ... and purging postgresql-9.4 correctly asks. piuparts runs everything with DEBIAN_FRONTEND=noninteractive, in case it does matter > Note that the postrm *does* load debconf: > > if [ "$1" = purge ] && [ -d "/etc/postgresql/$VERSION" ] && [ "$(ls > /etc/postgresql/$VERSION)" ]; then > # can't load debconf from a function > if [ -e /usr/share/debconf/confmodule ]; then > . /usr/share/debconf/confmodule > fi > purge_package > fi But debconf/jessie does only load templates if called from preinst/postinst (debconf/sid does this for prerm/postrm, too), see /usr/share/debconf/frontend (Debconf::Template->load()) > I can put the debconf code into the postinst as well, but before I do > that, I'd like to understand if that is really the problem. The > postinst doesn't use debconf, only the postrm. At least for jessie the templates have to be registered during preinst/postinst. I manually added the debconf code to /usr/share/postgresql-common/maintscripts-functions (to avoid rebuilding pg), thereafter installation registered the templates and purge went fine Andreas