Locale errors on perl package upgrade

Bug #871855 reported by Jonathan Davies
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
langpack-locales (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Perl returns cosmetic locale errors after a package upgrade:

[..]
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://us.archive.ubuntu.com/ubuntu/ oneiric/main python-minimal all 2.7.2-5ubuntu2 [30.7 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ oneiric/main python all 2.7.2-5ubuntu2 [166 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ oneiric/main libdb4.8 amd64 4.8.30-9ubuntu1 [679 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ oneiric/main friendly-recovery all 0.2.17 [7406 B]
Fetched 883 kB in 3s (273 kB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_MESSAGES = "fr_FR.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
(Reading database ... 85602 files and directories currently installed.)
Preparing to replace python-minimal 2.7.2-5ubuntu1 (using .../python-minimal_2.7.2-5ubuntu2_all.deb) ...
Unpacking replacement python-minimal ...
Processing triggers for man-db ...
[...]

We should narrow or eliminate the window in which we have no valid locales installed.

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

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

Changed in langpack-locales (Ubuntu):
status: New → Confirmed
Revision history for this message
Fabián Rodríguez (magicfab) wrote :

This happens in a new install from Alternate edition, when using the US alternative keyboard.

I normally use this keyabord layout for installation as I need accents for some of the initial setup information, but want to remain as close as possible to a default us-EN layout.

Martin Pitt (pitti)
Changed in langpack-locales (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Low
Revision history for this message
markusj (markusj) wrote :

I can confirm this issue for a new oneiric x64 desktop edition install. I get those annoying warnings when using git. I already tried to fix my locale settings on every place i could find, with no success.

git pull
> perl: warning: Setting locale failed.
> perl: warning: Please check that your locale settings:
> LANGUAGE = (unset),
> LC_ALL = (unset),
> LC_CTYPE = "de_DE.utf8",
> LC_COLLATE = "de_DE.utf8",
> LC_MESSAGES = "de_DE.utf8",
> LANG = "en_US.UTF-8"
> are supported and installed on your system.
>perl: warning: Falling back to the standard locale ("C").
>Already up-to-date.

I set up my locale in /etc/default/locale, /etc/environment, ~/.profile, tried locale-gen en_US.UTF-8, purging, reconfiguring and reinstalling locales but nothing worked, git (or perl) complains still about locale settings.

(Output slightly reordered for shortening purposes)
> markus@markusnb:~$ locale
> LANGUAGE=de_DE.utf8:en
> LANG=de_DE.utf8
> LC_ALL=
> LC_CTYPE=de_DE.utf8
and so on for: LC_TIME, LC_COLLATE, LC_MONETARY, LC_MESSAGES, LC_PAPER, LC_NAME, LC_ADDRESS, LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION

markus@markusnb:~$ locale -a
>C
>C.UTF-8
[...]
>de_DE
>de_DE.iso88591
>de_DE.utf8
[...]
>en_US
>en_US.iso88591
>en_US.utf8
[...]
>POSIX

Oh, and /usr/share/locale contains de_DE and en_US@piglatin, so i see no reason why perl fails to do whatever it should do

To sum it up: I *have* set up my locales and en_US.UTF-8 *exists* (however, i *never* instructed someone to use it!) but perl ignores those settings and whines about missing/wrong locales it has chosen by itself!

One last tought: Is this a langpack-locales bug or a perl bug or from where does it come from and what can i do against it? Will it break my git repositories?

Revision history for this message
markusj (markusj) wrote :

Ok, i just fixed it for me. It appears like if perl did not like my "LANGUAGE=de_DE.utf8:en", i'm not sure if it's invalid or just a perl issue.
However, "LANGUAGE=de_DE:de:en_GB:en" works now fine.

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 871855] Re: Locale errors on perl package upgrade

markusj [2012-02-09 21:06 -0000]:
> It appears like if perl did not like my "LANGUAGE=de_DE.utf8:en"

Yes, this is invalid. de_DT.utf8 is a locale, not a language.

> However, "LANGUAGE=de_DE:de:en_GB:en" works now fine.

That's correct.

Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

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.