[solved] non interactive tango-common installation with debconf

I send back this post since it could probably be useful for other users.

Hi tangoers,
I would like to install tango-common in a non interactive way.

To give answers to this package debconf questions, I currently use:
echo "tango-common tango-common/tango-host string ${TANGOSERVER}:20000" | sudo debconf-set-selections
$TANGOSERVER is the network name of the server I installed just before on the same computer.

I then install tango-common.
However, during the installation (of a lot of package, in particular tango-db and tango-common), I got the following interactive message:
Outil de configuration des paquets

┌─────────────────┤ Configuration de tango-common ├─────────────────┐
│ Veuillez indiquer le nom de la machine sur laquelle le serveur de │
│ bases de données de Tango est installé.                           │
│                                                                   │
│ Serveur Tango : │                                                 │
│                                                                   │
│ debian9-1:10000__________________________________________________ │
│                                                                   │
│ <Ok>│                                                             │
│                                                                   │
└───────────────────────────────────────────────────────────────────┘
In short, it asks in french what is the computer where tango database server is installed.

When I accept this configuration without modifying it, I got the following behavior:
$> sudo debconf-get-selections | grep tango-common
tango-common tango-common/tango-host string debian9-1:20000
$>

So I understand the pre written answer I accepted (debian9-1:10000) is not saved anywhere but still is asked whatever I do (I replayed the installation several times to check).

This problem occurs since debian9 and mariadb-server, which seems to need to launch mysql_secure_installation after mariadb-server installation.
Once this done, the problem disappears.
- Philippe
Edited 6 years ago
Hello, If I understand correctly, you already installed tango-db on the computer. during this process you were asked by dbconfig the tango host. which by default is <host>:10000. So tango-common was already configured with the default values.

then you update the dbconfig database with the set selection. -> debian9-1:20000

and when you get the values with get it gives you debian9-1:20000.

this is normal, since dbconfig is not a register database. The real configuration values are stored in /etc/tangorc

the set works only the first time when tangorc is not available on the system.

If then you do

dpkg-reconfigure tango-common

you will see that dbconfig parameters will be that time the one with :10000 (red from the /etc/tangorc)

Is it clear ?
Hello, thank you for your answer.
In fact, I installed from scratch a debian9.

After some investigations, this issue was due to tango-common which was a dependency of tango-db, and thus was installed without line
echo "tango-common tango-common/tango-host string ${TANGOSERVER}:20000" | sudo debconf-set-selections

I edited my first post to clarify this point.
- Philippe
 
Register or login to create to post a reply.