Comment 12 for bug 560956

Revision history for this message
Aisano (info-ais-sanmarino) wrote : Re: wrong language code: eo.utf8

**** Information relevant for a STABLE RELEASE UPDATE nomination ****

1. The bug outputs a lot of unjustified warnings to users of synaptic or apt-get who have a countryless locale ($LANG value) with an encoding, such as "eo.utf8". Synaptic displays these warnings in a separate window which has to be closed by the user. Although the function of the programs (which are critical for system administration) is not affected the user has no way of telling.

2. The bug has been patched for "apt-0.7.25". So far, libapt did not correctly parse locales without an underscore but with an encoding. The parsing algorithm has been extended to consider a period (dot) as a separator as well. This extension comes into effect only after and if the traditional approach has failed.

3. The patch (attached to #8 above) adds two lines to the indexfile.cc source file. Michael Vogt (responsible for the apt package) has approved it.

TEST CASE
4. (A test script to reproduce the error was attached to #6 above before the patch was begun.) On a computer with the "eo.utf8" (Esperanto) locale installed it is suffcient to call "sudo LANG=eo.utf8 synaptic", and synaptic will display a warning window saying "W: Wrong language code eo.utf8" (several times; picture attached above under #1). With the patch installed this warning window does not appear.

If the "eo.utf8" locale is not installed a pseudo locale can be created by performing three commands:
$ cd /usr/lib/locale
$ sudo mkdir eo.utf8
$ sudo cp -r en_US.utf8/* eo.utf8
Afterwards, the test command ("sudo LANG=eo.utf8 synaptic") can be called as above. The pseudo locale can then be removed by "sudo rm -r eo.utf8".

5. Regression potential. If somebody had created a locale of their own with a period inside the language code, and without a country code (such"LANG=x..utf8"), then the patch would affect (not break) the use of such a locale, as the user would start getting the warnings described above. As language codes are internationally standardized (ISO 639) to consist of letters only, the warnings would be justified in this case.

Michael Vogt is going to nominate this patch for an SRU and upload it.