Control: tag -1 moreinfo

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

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

... and purging postgresql-9.4 correctly asks.

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

#DEBHELPER#

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.

Christoph

[1] It's in German even if I remove po-debconf and debconf-i18n before
installing anything. Huh.

Reply via email to