Bug#930677: unused-debconf-template triggers when template is used in postrm only
Package: lintian
Version: 2.15.0
Severity: normal
postgresql-12 is using debconf in the purge phase only:
purge_package () {
# ask the user if they want to remove clusters. If debconf is not
# available, just remove everything
if [ -e /usr/share/debconf/confmodule ]; then
db_set $DPKG_MAINTSCRIPT_PACKAGE/postrm_purge_data true
db_input high $DPKG_MAINTSCRIPT_PACKAGE/postrm_purge_data || :
db_go || :
db_get $DPKG_MAINTSCRIPT_PACKAGE/postrm_purge_data || :
[ "$RET" = "false" ] && return 0
fi
This triggers unused-debconf-template:
I: postgresql-12: unused-debconf-template postgresql-12/postrm_purge_data
N:
N: Templates which are not used by the package should be removed from the
N: templates file.
N:
N: This will reduce the size of the templates database and prevent
N: translators from unnecessarily translating the template's text.
N:
N: In some cases, the template is used but Lintian is unable to determine
N: this. Common causes are:
N:
N: - the maintainer scripts embed a variable in the template name in order
N: to allow a template to be selected from a range of similar templates
N: (e.g. db_input low start_$service_at_boot)
N:
N: - the template is not used by the maintainer scripts but is used by a
N: program in the package
N:
N: - the maintainer scripts are written in perl. Lintian currently only
N: understands the shell script debconf functions.
N:
N: If any of the above apply, please install an override.
N:
N: Severity: minor, Certainty: possible
N:
N: Check: debconf, Type: binary, udeb, source
I'm filing this bug because "postrm" isn't listed among the common
causes. Please either check postrm as well, or mention it there.
If the problem is rather $DPKG_MAINTSCRIPT_PACKAGE, please support
that use.
Thanks,
Christoph
Reply to: