language-selector updates /etc/environment when it shouldn't, and gives results that are inconsistent with an initial install

Bug #1035498 reported by Steve Langasek
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
language-selector (Ubuntu)
Fix Released
High
Unassigned
Precise
Won't Fix
High
Unassigned
Quantal
Fix Released
High
Unassigned

Bug Description

To debug bug #1034806, I configured Russian locale support using language-selector. Afterwards I noticed that both /etc/environment and /etc/default/locale had been populated with the set of environment variables. This is wrong, language-selector should *only* be updating /etc/default/locale: all pam_env-enabled services are supposed to read from both /etc/environment and /etc/default/locale, precisely so that /etc/default/locale can be used as the *one* file on the system where default locale settings are specified.

The output of language-selector is also very different from the output of ubiquity: whereas ubiquity only sets the LANG variable, language-selector outputs the full range of LC_* variables as well as LANG and LANGUAGE. I don't know of any specific bugs resulting from this, but I have seen bug reports in the past related to LC_* variables and I'm concerned that this inconsistency will cause confusing behavior in some cases.

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: language-selector-gnome 0.84
ProcVersionSignature: Ubuntu 3.5.0-8.8-generic 3.5.0
Uname: Linux 3.5.0-8-generic x86_64
ApportVersion: 2.4-0ubuntu6
Architecture: amd64
Date: Fri Aug 10 15:39:57 2012
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
PackageArchitecture: all
SourcePackage: language-selector
UpgradeStatus: Upgraded to quantal on 2012-06-11 (60 days ago)

Revision history for this message
Steve Langasek (vorlon) wrote :
tags: added: rls-q-incoming runing-unity
removed: running-unity
Changed in language-selector (Ubuntu):
importance: Undecided → High
status: New → Triaged
Changed in language-selector (Ubuntu Precise):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Steve Langasek (vorlon) wrote :

The duplication between files is important enough that I think an SRU to the preceding LTS is warranted (with cleanup handling in the postinst to remove any duplicate entries).

Steve Langasek (vorlon)
tags: removed: runing-unity
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package language-selector - 0.85

---------------
language-selector (0.85) quantal; urgency=low

  * ls-dbus-backend: fix for python3 compatibility. LP: #1014429.
  * Do not touch /etc/environment; we should be updating /etc/default/locale
    exclusively. On upgrade, clean up any references that have been left
    behind in /etc/environment. LP: #1035498.
 -- Steve Langasek <email address hidden> Fri, 10 Aug 2012 22:06:35 -0700

Changed in language-selector (Ubuntu Quantal):
status: Triaged → Fix Released
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2012-08-11 00:46, Steve Langasek wrote:> The output of language-selector is also very different from the output
> of ubiquity: whereas ubiquity only sets the LANG variable, language-
> selector outputs the full range of LC_* variables as well as LANG and
> LANGUAGE. I don't know of any specific bugs resulting from this, but I
> have seen bug reports in the past related to LC_* variables and I'm
> concerned that this inconsistency will cause confusing behavior in some
> cases.

Unlike the UI of language-selector, the UI of ubiquity is not designed to distinguish between language and regional format or populate the LANGUAGE environment variable. Rather than considering this to be an inconsistency, so far I have thought that ubiquity sets the minimum needing to proceed, while language-selector provides an interface to fine-tune the language and regional format settings.

For an explanation of the current design of language-selector, you may want to read

yelp ghelp:language-selector

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 1035498] Re: language-selector updates /etc/environment when it shouldn't, and gives results that are inconsistent with an initial install

On Thu, Sep 13, 2012 at 07:47:54PM -0000, Gunnar Hjalmarsson wrote:

> Unlike the UI of language-selector, the UI of ubiquity is not designed
> to distinguish between language and regional format or populate the
> LANGUAGE environment variable. Rather than considering this to be an
> inconsistency, so far I have thought that ubiquity sets the minimum
> needing to proceed, while language-selector provides an interface to
> fine-tune the language and regional format settings.

No, that's not true at all. Ubiquity is designed to correctly install and
set up the system. The output should not be inconsistent between these two
for the single-language case.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Hi Steve,
I'm not sure I understand what the problem would be in practice. Anyway, if you let us know which specific changes you would like to see, I'll be happy to talk more about it.
(I have spent quite some time with language and locale settings in language-selector and accountsservice in order to _prevent_ confusing behavior.)

Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in language-selector (Ubuntu Precise):
status: Triaged → Won't Fix
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.