Incorrect locale if the host's locale is not present in the desktop next ISO

Bug #1466035 reported by David Planella
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Unity8 Desktop Preview in LXC
Status tracked in Development
Development
Fix Committed
High
Marius Gripsgard 
unity8-lxc (Ubuntu)
Fix Released
High
Marius Gripsgard 

Bug Description

If unity8-lxc-setup is run from a host with a locale that is not included in the desktop next iso (which has only got a few language packs installed), there are a few warnings shown during the setup:

http://pastebin.ubuntu.com/11724558/

The issue is that the host's locale is not recognized and in the container it is then set as "POSIX" upon failure to recognize it. "POSIX" is an invalid locale name, which then prevents Mir from starting in the unity8 session.

The workaround for this after the setup is to generate the locale inside the container. In this particular case, it was the 'ca' locale:

root@unity8-lxc:~# locale-gen ca
Generating locales...
  ca_AD.UTF-8... done
  ca_ES.UTF-8... done
  ca_ES.UTF-8@valencia... done
  ca_FR.UTF-8... done
  ca_IT.UTF-8... done
Generation complete.
root@unity8-lxc:~# locale
LANG=ca_ES.UTF-8
LANGUAGE=ca_ES
LC_CTYPE="ca_ES.UTF-8"
LC_NUMERIC=ca_ES.UTF-8
LC_TIME=ca_ES.UTF-8
LC_COLLATE="ca_ES.UTF-8"
LC_MONETARY=ca_ES.UTF-8
LC_MESSAGES="ca_ES.UTF-8"
LC_PAPER=ca_ES.UTF-8
LC_NAME=ca_ES.UTF-8
LC_ADDRESS=ca_ES.UTF-8
LC_TELEPHONE=ca_ES.UTF-8
LC_MEASUREMENT=ca_ES.UTF-8
LC_IDENTIFICATION=ca_ES.UTF-8
LC_ALL=

Here's an explanation of why this might be happening: http://askubuntu.com/a/144448/9781

Perhaps the best thing to do would be for unity8-lxc-setup to run locale-gen if it detects that the host locale is not recognized? Or to simply add a step to run locale-gen regardless, which might be much simpler and less error-prone.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity8-lxc (Ubuntu):
status: New → Confirmed
Changed in unity8-preview-lxc:
status: New → Confirmed
importance: Undecided → High
Changed in unity8-lxc (Ubuntu):
importance: Undecided → High
Changed in unity8-preview-lxc:
milestone: none → 1.0.4
status: Confirmed → In Progress
Changed in unity8-lxc (Ubuntu):
status: Confirmed → In Progress
Changed in unity8-preview-lxc:
assignee: nobody → Marius Gripsgard (mariogrip)
Changed in unity8-lxc (Ubuntu):
assignee: nobody → Marius Gripsgard (mariogrip)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity8-lxc - 1.0.5+16.04.20151027-0ubuntu1

---------------
unity8-lxc (1.0.5+16.04.20151027-0ubuntu1) xenial; urgency=medium

  [ Chris Townsend ]
  * Bump version to 1.0.5.
  * Rework unity8-lxc-setup to download the latest Ubuntu release LXC and
    install a Unity 8 desktop session metapackage insteaf using the now
    deprecated Ubuntu Desktop Next ISO image. (LP: #1477720)
  * Many fixes for systemd based containers.
  * Changed some command line options to only have '--rebuild'.

  [ Marius Gripsgard ]
  * Bind mount the hosts locale inside the container. (LP: #1466035)

  [ CI Train Bot ]
  * No-change rebuild.

 -- Christopher Townsend <email address hidden> Tue, 27 Oct 2015 18:50:12 +0000

Changed in unity8-lxc (Ubuntu):
status: In Progress → Fix Released
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.