path: root/debian/taler-merchant.preinst
diff options
Diffstat (limited to 'debian/taler-merchant.preinst')
1 files changed, 11 insertions, 0 deletions
diff --git a/debian/taler-merchant.preinst b/debian/taler-merchant.preinst
index df57b007..d1f67d88 100644
--- a/debian/taler-merchant.preinst
+++ b/debian/taler-merchant.preinst
@@ -7,6 +7,17 @@
set -e
+# When purging this package after the selections in the preinst have been made,
+# the debconf database is left in an inconsistent state and the package cannot
+# be installed again. This happens because dbconf-common will create a
+# template for these questions with a shared owner. Purging will only delete
+# one of the two templates, leading to a DB state where debconf-set-selections
+# fails. We work around this by manually fixing up the debconf database.
+if [ -x /usr/share/debconf/ ]; then
+ /usr/share/debconf/
echo taler-merchant taler-merchant/pgsql/method select Unix socket | debconf-set-selections
echo taler-merchant taler-merchant/pgsql/authmethod-user select ident | debconf-set-selections
echo taler-merchant taler-merchant/pgsql/app-pass password | debconf-set-selections