[Bug 1560577] Re: Confusing new locale-gen behavior

Gunnar Hjalmarsson 1560577 at bugs.launchpad.net
Tue Mar 22 23:47:04 UTC 2016


Well, after having looked at the /usr/sbin/locale-gen script and done
some further testing, I see that not *all* arguments are ignored. The
synopsis seems to be:

locale-gen [[--keep-existing] LANGUAGE]

where LANGUAGE is the name of a file in /var/lib/locales/supported.d.
(If you state multiple LANGUAGE arguments, only the last is recognized.)
The --keep-existing option prevents purging of previously generated
locales.

So basically you can

* Purge all existing locales and generate all locales in
  /var/lib/locales/supported.d

  sudo locale-gen

* Purge all existing locales and generate the locales of *one* file
  in /var/lib/locales/supported.d

  sudo locale-gen LANGUAGE

* [Re-]generate the locales of *one* file in
  /var/lib/locales/supported.d language-pack without purging

  sudo locale-gen --keep-existing LANGUAGE

This is quite different compared to the way the old locale-gen worked.

* All locales are purged by default

* No simple way to generate locales included in SUPPORTED in addition
  to the locales belonging to installed language packs.

* The man page is pretty useless.

I fear that this will result in a lot user confusion. Possibly there is
some point with the new behavior, but at this time I fail to see it. In
any case the change should be accompanied by some proper documentation.

I would suggest that we use the old locale-gen script (and the related
man page) in 16.04. Then, post Xenial, we could consider more thoroughly
what to do going forward.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to glibc in Ubuntu.
https://bugs.launchpad.net/bugs/1560577

Title:
  Confusing new locale-gen behavior

Status in glibc package in Ubuntu:
  New

Bug description:
  When the locales package was provided by the langpack-locales source
  package, you could call locale-gen with arguments. Examples:

  sudo locale-gen en_US.UTF-8
  (to generate that locale only)

  sudo locale-gen --purge
  (to purge all existing locales and create all locales)

  With the locales package provided by glibc, the equivalent to the
  latter seems to be:

  sudo locale-gen

  What's problematic is that if you add an argument (any argument), the
  existing locales seem to be purged, but nothing is generated. I'd
  consider this to be a pretty serious regression, which will likely
  result in locale issues for many users, if something isn't done to fix
  it. I'm not sure how to best deal with the problem, though.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1560577/+subscriptions



More information about the foundations-bugs mailing list