[Debconf-devel] Bug#466530: [Fwd: Handling values with db_get in case of translation]

Olivier Berger olivier.berger at it-sudparis.eu
Thu Feb 21 09:59:05 UTC 2008


Le jeudi 21 février 2008 à 09:05 +0000, Colin Watson a écrit :
> On Wed, Feb 20, 2008 at 03:12:34PM +0100, Olivier Berger wrote:
> > However, it seems that the db_get results depend on the locale, and
> > return "Basée sur ident" instead of "Ident-based" when with french
> > locale...
> 
> That's odd; it's definitely supposed to be translated back to the
> English text before being stored in the database, so GET should always
> return the untranslated text from Choices rather than the translated
> text from Choices-fr.UTF-8. I can't reproduce this with the sympa
> package in unstable with LANG=fr_FR.UTF-8:
> 
>   debconf (developer): <-- INPUT medium sympa/db_authtype
>   debconf (developer): --> 0 question will be asked
>   debconf (developer): <-- GO
>   debconf (developer): --> 0 ok
>   debconf (developer): <-- GET sympa/db_authtype
>   debconf (developer): --> 0 Ident-based
> 
> I did need the following patch to fix some broken code in the config
> script before I could get anywhere, though. Racke, perhaps you could
> apply this while we figure out the rest of it?
> 

SNIP

Applied that one patch and tested with a modified package installation.

> Olivier, exactly which locale are you using (output of 'locale'), and
> which debconf frontend are you using (output of 'echo GET
> debconf/frontend | debconf-communicate')?
> 

The result is still the same.

See traces of adding set -x in /usr/share/sympa/db/prepare_db :
vserver1:~# vi /usr/share/sympa/db/prepare_db
vserver1:~# dpkg-reconfigure sympa
Stopping Sympa mailing list manager: sympa.
+ case $db_type in
+ db_get sympa/db_authtype
+ _db_cmd 'GET sympa/db_authtype'
+ IFS=' '
+ printf '%s\n' 'GET sympa/db_authtype'
+ IFS='
'
+ read -r _db_internal_line
+ RET='Basée sur ident'
+ case ${_db_internal_line%%[ 	]*} in
+ return 0
+ '[' 'Basée sur ident' = Ident-based ']'
+ /usr/share/sympa/db/install-pg-db -w sympa -a /tmp/filejOJiLb -d sympa -h localhost -u /tmp/filelcCU9b
DBI connect('dbname=template1','postgres',...) failed: FATAL:  authentification Ident échouée pour l'utilisateur « postgres »
 at /usr/share/sympa/db/install-pg-db line 71

vserver1:~# locale
LANG=fr_FR.UTF-8
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=

# echo GET debconf/frontend | debconf-communicate
0 Dialog

Hope this helps,
-- 
Olivier BERGER <olivier.berger at it-sudparis.eu> (*NEW ADDRESS*)
http://www-inf.it-sudparis.eu/~olberger/ - OpenPGP-Id: 1024D/6B829EEC
Ingénieur Recherche - Dept INF
Institut TELECOM / TELECOM & Management SudParis
(http://www.it-sudparis.eu/), Evry





More information about the Debconf-devel mailing list