[Debconf-devel] Fwd: Packaging problem with debconf
Damien HENRY - MytinyDC.com
dhenry at mytinydc.com
Sun May 5 05:02:47 BST 2019
Hi,
I m trying to build one package for matrix-synapse arm64, for 1 day, i m
looking for and no responses on "google".
*Env : debian stretch (tried on amd64 and arm64 same result)
*
I ve this code :
*file /DEBIAN/config*
# Database
db_input critical matrix/DATABASES || true
db_go
db_get matrix/DATABASES
if [ "$RET"= "Postgresql"]; then
# Ip ou fqdn postgresql server
db_input critical matrix/POSTGRESIP || true
db_go
# Port postgresql service
db_input critical matrix/POSTGRESPORT || true
db_go
fi
**when i use dpkg-reconfigure, it seems RET is always empty and the
processs never enter in the condition.**
*debug traces :*
debconf (developer): <-- INPUT critical matrix/DATABASES
debconf (developer): --> 0 question will be asked
debconf (developer): <-- GO
debconf (developer): --> 0 ok
debconf (developer): <-- GET matrix/DATABASES
debconf (developer): --> 0 Postgresql
debconf (developer): starting /var/lib/dpkg/info/synapse-matrix.postinst
configure 0.99.3
debconf (developer): <-- GET matrix/DATABASES
debconf (developer): --> 0 Postgresql
**
**
**I change the code to check RET value : *dpkg-reconfigure with set|grep
-E "^RET=" after db_get*
# Database
db_input critical matrix/DATABASES || true
db_go
db_get matrix/DATABASES
set|grep -E "^RET="
if [ "$RET"= "Postgresql"]; then
# Ip ou fqdn postgresql server
db_input critical matrix/POSTGRESIP || true
db_go
# Port postgresql service
db_input critical matrix/POSTGRESPORT || true
db_go
fi
debconf (developer): <-- INPUT critical matrix/DATABASES
debconf (developer): --> 0 question will be asked
debconf (developer): <-- GO
debconf (developer): --> 0 ok
debconf (developer): <-- GET matrix/DATABASES
debconf (developer): --> 0 Postgresql
RET='Postgresql'
debconf (developer): starting /var/lib/dpkg/info/synapse-matrix.postinst
configure 0.99.3
debconf (developer): <-- GET matrix/DATABASES
debconf (developer): --> 0 Postgresql
*Variable RET is set with the correct value but go directly to postinst*
*and the same in postinst file, if i try a condition before reading with
db_get, RET is always empty...
*
*I ve tried with /bin/sh /bin/bash
*
*Have you got an idea ?*
*Best regards.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debconf-devel/attachments/20190505/1aff39d3/attachment.html>
More information about the Debconf-devel
mailing list