upgrading mailman changed DEFAULT_SERVER_LANGUAGE from "en" to "zh_TW"

Bug #1748386 reported by Junien F
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mailman (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Hi,

I just upgraded mailman:amd64 from 2.1.20-1ubuntu0.1 to 2.1.20-1ubuntu0.3, and in /etc/mailman/mm_cfg.py, the following happened :

-DEFAULT_SERVER_LANGUAGE = 'en'
+DEFAULT_SERVER_LANGUAGE = 'zh_TW'

Can the upgrade please not change the default language ?

Thanks

$ lsb_release -rd
Description: Ubuntu 16.04.3 LTS
Release: 16.04

Tags: xenial
tags: added: xenial
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

/etc/mailman/mm_cfg.py is currently not considered a conffile of mailman.
That is the reason it is overwritten on an update instead of getting the usual "you had differences do you want the maintainers content, Y/N/show diff".

But currently:
# cat /var/lib/dpkg/info/mailman.conffiles
/etc/cron.d/mailman
/etc/init.d/mailman
/etc/logrotate.d/mailman
/etc/mailman/apache.conf

OTOH this doesn't seem a normal file - there is some special handling for language.
This is doen via debconf - so when you first installed you were asked what the default should be and this is generated into this file.

 92 if [ -e /etc/mailman/mm_cfg.py ]; then
 93 db_get mailman/default_server_language || true
 94 if [ -n "$RET" ]; then
 95 default_server_language="$(echo $RET | sed -r 's/ \([^\)]*\)//g')"
 96 sed -e s/DEFAULT_SERVER_LANGUAGE.*=.*\'..\'/DEFAULT_SERVER_LANGUAGE\ =\ \'${default_server_language}\'
 97 mv -f ${mm_etc}/mm_cfg.py.$$ ${mm_etc}/mm_cfg.py
 98 fi
 99 fi

That code seems odd to me, but I'm not a debconf expert anyway.
SO in general this file seems to be handled "special" in the postinst.

I see it will
1. do the check above to set language from debconf
2. place the file if it does not exist (cp from /usr/lib/mailman/Mailman/mm_cfg.py.dist)
   IMHO that should be before above check
3. if mm_defaults is still in the file configure it

While I think #2 and #1 would need some fixes (separate issue IMHO) I wonder where your problem might come from.
Maybe just that you need to set the debconf.
What does:
$ debconf-show mailman
show you for mailman/site_languages?

If it is not zh_TW you might set it with:
$ echo "set mailman/default_server_language zh_TW" | debconf-communicate
After that does an install still clobber it for you?

Changed in mailman (Ubuntu):
status: New → Incomplete
Revision history for this message
Junien F (axino) wrote :

Sure enough, I have mailman/default_server_language: zh_TW

Fixed with :
$ echo "set mailman/default_server_language en" | sudo debconf-communicate

Thanks !

Changed in mailman (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.