[Pkg-roundcube-maintainers] Bug#923142: Debconf option roundcube/language has no effect

Oleg Strikov xj8z at xj8z.ru
Sun Feb 24 12:07:54 GMT 2019


Package: roundcube
Version: 1.3.8+dfsg.1-2

I expected to see $config['language'] = 'ru_RU' in the configuration
file after setting debconf option roundcube/language accordingly,
but that's not what happened:

# echo roundcube-core roundcube/language string ru_RU | debconf-set-selections
# apt-get install roundcube
# grep language /etc/roundcube/config.inc.php || echo Not found
Not found

Postinst script roundcube-core.postinst has no way to add new lines to
the template placed at /usr/share/roundcube/config.inc.php.sample. It can
only modify values of existing variables. Current version of the template
doesn't contain $config['language'] line hence this variable can't be set
by postinst script during configuration.

Unfortunately, we can't simply copy $config['language'] line from
defaults.inc.php to config.inc.php.sample. If no $config['language'] line
exists in the configuration file or its value is null, roundcube uses
HTTP_ACCEPT_LANGUAGE-based language auto-detection, which is desired behavior.
Debconf sets roundcube/language to en_US (or some other language based on
locale) by default which would disable auto-detection for all installations
if this value gets propagated to the configuration file every time. In order
to avoid this, we need to add $config['language'] line to the configuration
file only if roundcube/language has been manually set (preseeded).



More information about the Pkg-roundcube-maintainers mailing list