Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 163543 - LANG overwrites LC_MESSAGES
Summary: LANG overwrites LC_MESSAGES
Status: RESOLVED DUPLICATE of bug 163835
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-24 04:39 UTC by impulze
Modified: 2007-01-26 17:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
locale (locale,306 bytes, text/plain)
2007-01-24 04:40 UTC, impulze
Details
locale -a (localea,30 bytes, text/plain)
2007-01-24 04:41 UTC, impulze
Details
emerge --info (emergeinfo,9.79 KB, text/plain)
2007-01-24 04:41 UTC, impulze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description impulze 2007-01-24 04:39:33 UTC
When specifying the LANG and LC_MESSAGES variables, LANG overwrites LC_MESSAGES which it shouldn't do as described in http://www.gnu.org/software/libc/manual/html_node/Locale-Categories.html#Locale-Categories


Reproducible: Always

Steps to Reproduce:
1. Generate two different locales (e.g. en_US.utf8 and de_DE.utf8)
2. Specify one as LANG and the other as LC_MESSAGES temporarily (or in /etc/env.d/02locales and then run env-update and source /etc/profile)
3. fire up "man foobar" e.g. (LANG="firstlocale" LC_MESSAGES="secondlocale" man foobar)

Actual Results:  
The message given by man is written with the locale of the LANG variable.

Expected Results:  
The message should be written with the locale of the LC_MESSAGES variable.
Comment 1 impulze 2007-01-24 04:40:45 UTC
Created attachment 107970 [details]
locale
Comment 2 impulze 2007-01-24 04:41:00 UTC
Created attachment 107971 [details]
locale -a
Comment 3 impulze 2007-01-24 04:41:14 UTC
Created attachment 107973 [details]
emerge --info
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-01-24 08:04:16 UTC
You know, it works perfectly fine here; you'd better make sure that the 'foobar' manpages is localized and that you haven't purged it. :)
Comment 5 impulze 2007-01-24 14:06:43 UTC
No, i get "Keine Handbuchseite für foobar" which is german instead of "No manual entry for foobar".
Comment 6 Rainer Müller 2007-01-24 17:27:44 UTC
(In reply to comment #5)
> No, i get "Keine Handbuchseite für foobar" which is german instead of "No
> manual entry for foobar".

I tested this on a debian 4.0 (testing), where it works as expected:

rainer@localhost:~$ locale -a
C
POSIX
de_DE.utf8
en_US.utf8
rainer@localhost:~$ LANG=de_DE.utf8 LC_MESSAGES=en_US.utf8 man foobar
No manual entry for foobar



Comment 7 impulze 2007-01-24 17:51:39 UTC
No, i get "Keine Handbuchseite für foobar" which is german instead of "No manual entry for foobar".
Comment 8 impulze 2007-01-24 17:53:55 UTC
the last comment was not supposed to be commited :(
Comment 9 impulze 2007-01-24 17:59:42 UTC
seems to be a problem with man only:
Istari impulze # LC_MESSAGES="de_DE.utf8" gcc foo
gcc: foo: Datei oder Verzeichnis nicht gefunden
gcc: keine Eingabedateien
Istari impulze # LC_MESSAGES="en_US.utf8" gcc foo
gcc: foo: No such file or directory
gcc: no input files
Istari impulze # LC_MESSAGES="de_DE.utf8" man foo
Keine Handbuchseite für foo
Istari impulze # LC_MESSAGES="en_US.utf8" man foo
Keine Handbuchseite für foo
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2007-01-24 19:12:37 UTC
As said, works just fine here.
Comment 11 Benjamin Kramer 2007-01-24 19:28:04 UTC
got the same bug here

~ % LC_MESSAGES="en_US.utf8" man foo
Keine Handbuchseite für foo
~ % LANG="en_US.utf8" man foo
Keine Handbuchseite für foo
~ % LC_ALL="en_US.utf8" LANG="en_US.utf8" man foo
No manual entry for foo

Portage 2.1.2-r3 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.19-gentoo-r4 i686)
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
Comment 12 Christian Ruppert (idl0r) gentoo-dev 2007-01-25 04:07:09 UTC
idle@odin ~ $ locale
LANG=de_DE.utf8
LC_CTYPE="de_DE.utf8"
LC_NUMERIC="de_DE.utf8"
LC_TIME="de_DE.utf8"
LC_COLLATE="de_DE.utf8"
LC_MONETARY="de_DE.utf8"
LC_MESSAGES="de_DE.utf8"
LC_PAPER="de_DE.utf8"
LC_NAME="de_DE.utf8"
LC_ADDRESS="de_DE.utf8"
LC_TELEPHONE="de_DE.utf8"
LC_MEASUREMENT="de_DE.utf8"
LC_IDENTIFICATION="de_DE.utf8"
LC_ALL=de_DE.utf8

idle@odin ~ $ locale -a
C
de_DE
de_DE@euro
de_DE.utf8
en_GB
en_GB.utf8
en_US
en_US.utf8
POSIX

idle@odin ~ $ man foo
Keine Handbuchseite für foo

idle@odin ~ $ LC_MESSAGES="en_US.utf8" man foo
Keine Handbuchseite für foo

idle@odin ~ $ gcc
gcc: keine Eingabedateien

idle@odin ~ $ LC_MESSAGES="en_US.utf8" gcc
gcc: keine Eingabedateien

:/
Comment 13 Christian Ruppert (idl0r) gentoo-dev 2007-01-25 04:16:04 UTC
(In reply to comment #12)
> idle@odin ~ $ locale
> LANG=de_DE.utf8
> LC_CTYPE="de_DE.utf8"
> LC_NUMERIC="de_DE.utf8"
> LC_TIME="de_DE.utf8"
> LC_COLLATE="de_DE.utf8"
> LC_MONETARY="de_DE.utf8"
> LC_MESSAGES="de_DE.utf8"
> LC_PAPER="de_DE.utf8"
> LC_NAME="de_DE.utf8"
> LC_ADDRESS="de_DE.utf8"
> LC_TELEPHONE="de_DE.utf8"
> LC_MEASUREMENT="de_DE.utf8"
> LC_IDENTIFICATION="de_DE.utf8"
> LC_ALL=de_DE.utf8
> 
> idle@odin ~ $ locale -a
> C
> de_DE
> de_DE@euro
> de_DE.utf8
> en_GB
> en_GB.utf8
> en_US
> en_US.utf8
> POSIX
> 
> idle@odin ~ $ man foo
> Keine Handbuchseite für foo
> 
> idle@odin ~ $ LC_MESSAGES="en_US.utf8" man foo
> Keine Handbuchseite für foo
> 
> idle@odin ~ $ gcc
> gcc: keine Eingabedateien
> 
> idle@odin ~ $ LC_MESSAGES="en_US.utf8" gcc
> gcc: keine Eingabedateien
> 
> :/
> 

ok ignore my first post please :D
i've unset my LC_ALL now and checked again.
gcc works now.. man not
i think it's a man bug :P
Comment 14 Christian Ruppert (idl0r) gentoo-dev 2007-01-25 04:18:20 UTC
idle@odin ~ $ locale
LANG=de_DE.utf8
LC_MESSAGES="de_DE.utf8"

idle@odin ~ $ locale -a
C
de_DE
de_DE@euro
de_DE.utf8
en_GB
en_GB.utf8
en_US
en_US.utf8
POSIX
 
idle@odin ~ $ man foo
Keine Handbuchseite für foo
 
idle@odin ~ $ LC_MESSAGES="en_US.utf8" man foo
Keine Handbuchseite für foo
 
idle@odin ~ $ gcc
gcc: keine Eingabedateien
 
idle@odin ~ $ LC_MESSAGES="en_US.utf8" gcc
gcc: no input files

gcc works.. man not
i think it's a man bug :P
Comment 15 Carsten Lohrke (RETIRED) gentoo-dev 2007-01-26 17:21:31 UTC
(In reply to comment #4)
> You know, it works perfectly fine here; you'd better make sure that the
> 'foobar' manpages is localized and that you haven't purged it. :)

It's not a matter of localized man pages, but the output of man itself - e.g. `man non-existing-man-page`.

Comment 16 Carsten Lohrke (RETIRED) gentoo-dev 2007-01-26 17:23:00 UTC
Can reproduce the problem with sys-apps/man-1.6d (having the nls use flag set of course).
Comment 17 Jakub Moc (RETIRED) gentoo-dev 2007-01-26 17:31:11 UTC
(In reply to comment #16)
> Can reproduce the problem with sys-apps/man-1.6d (having the nls use flag set
> of course).
> 

Then go reopen Bug 163835 and get 1.6e stabilized, *after* you've made sure it's been compiled w/ appropriate LINGUAS set. it works just perfectly fine there.

*** This bug has been marked as a duplicate of bug 163835 ***