Re: [gentoo-user] Re: /etc/locale vs /etc/env.d/02locale?

2011-06-19 Thread Walter Dnes
On Sat, Jun 18, 2011 at 02:46:45AM +0100, Peter Humphrey wrote

 Have you tried localepurge?

  A couple of notes/questions...

1) localepurge deletes the contents of subfolders in /usr/share/locale
but leaves the empty subfolders present.  Is it OK to delete the empty
subfolders?

2) I notice that localepurge did *NOT* delete the contents of
LC_MESSAGES in the following subfolders...
ast
be@latin
ca@valencia
crh
dz
en@shaw
io
kg
km
lg
mai
mg
my
nds
si
sr@latin
uz@cyrillic


-- 
Walter Dnes waltd...@waltdnes.org



Re: [gentoo-user] Re: /etc/locale vs /etc/env.d/02locale?

2011-06-19 Thread Peter Humphrey
On Sunday 19 June 2011 21:46:05 Walter Dnes wrote:
 1) localepurge deletes the contents of subfolders in /usr/share/locale
 but leaves the empty subfolders present.  Is it OK to delete the empty
 subfolders?

I assume so, though I haven't bothered. Why not try it and see?

 2) I notice that localepurge did *NOT* delete the contents of
 LC_MESSAGES in the following subfolders...
 ast
 be@latin
 ca@valencia
 crh
 dz
 en@shaw
 io
 kg
 km
 lg
 mai
 mg
 my
 nds
 si
 sr@latin
 uz@cyrillic

Those don't look like locale names to me: uz@cyrillic? What locale is that? 
Or en@shaw? Who is shaw? Those two at least don't exist on my system.

-- 
Rgds
Peter



[gentoo-user] Re: /etc/locale vs /etc/env.d/02locale?

2011-06-18 Thread walt
On 06/17/2011 06:46 PM, Peter Humphrey wrote:
 On Saturday 18 June 2011 01:50:12 walt wrote:
 
 I've tried to prevent the installation of many many unneeded megabytes
 of translation files in /usr/share/locale/* but I've never succeeded.

 Have you tried localepurge?

I just did, and thanks for the hint :)
 





[gentoo-user] Re: /etc/locale vs /etc/env.d/02locale?

2011-06-17 Thread walt
On 06/16/2011 12:00 PM, Paul Hartman wrote:
 On my personal
 system, I only install the US-English locales because I know I'm never
 going to use any of the others.

Me too -- or maybe I should say moi aussi.

I've tried to prevent the installation of many many unneeded megabytes
of translation files in /usr/share/locale/* but I've never succeeded.
ATM I have 101MB of *.mo translation files in /usr/share/locale even
though I deleted all of them less than a month ago.

I unset the 'nls' useflag in the hope it would solve the problem, but
no joy.

#env | grep L.NG
LINGUAS=
ALL_LINGUAS=
LANG=en_US.UTF8
LANGUAGE=en_US.UTF8

#locale
LANG=en_US.UTF8
LC_CTYPE=en_US.UTF8
LC_NUMERIC=en_US.UTF8
LC_TIME=en_US.UTF8
LC_COLLATE=C
LC_MONETARY=en_US.UTF8
LC_MESSAGES=en_US.UTF8
LC_PAPER=en_US.UTF8
LC_NAME=en_US.UTF8
LC_ADDRESS=en_US.UTF8
LC_TELEPHONE=en_US.UTF8
LC_MEASUREMENT=en_US.UTF8
LC_IDENTIFICATION=en_US.UTF8
LC_ALL=

Please apply cluestick with vigor...

Thanks.




[gentoo-user] Re: /etc/locale vs /etc/env.d/02locale?

2011-06-17 Thread Nikos Chantziaras

On 06/18/2011 03:50 AM, walt wrote:

On 06/16/2011 12:00 PM, Paul Hartman wrote:

On my personal
system, I only install the US-English locales because I know I'm never
going to use any of the others.


Me too -- or maybe I should say moi aussi.

I've tried to prevent the installation of many many unneeded megabytes
of translation files in /usr/share/locale/* but I've never succeeded.
ATM I have 101MB of *.mo translation files in /usr/share/locale even
though I deleted all of them less than a month ago.

I unset the 'nls' useflag in the hope it would solve the problem, but
no joy.


Unfortunately, many ebuilds go ahead and install translation files 
anyway.  Developers seem to ignore this if a package only installs one 
or two additional files.  For example, see this patch I submitted once:


  http://bugs.gentoo.org/show_bug.cgi?id=275980

It's not the end of the world, but I guess what the devs are missing is 
that one file here, one there, it adds up in the end.





Re: [gentoo-user] Re: /etc/locale vs /etc/env.d/02locale?

2011-06-17 Thread Peter Humphrey
On Saturday 18 June 2011 01:50:12 walt wrote:

 I've tried to prevent the installation of many many unneeded megabytes
 of translation files in /usr/share/locale/* but I've never succeeded.
 ATM I have 101MB of *.mo translation files in /usr/share/locale even
 though I deleted all of them less than a month ago.
 
 I unset the 'nls' useflag in the hope it would solve the problem, but
 no joy.

Have you tried localepurge?

-- 
Rgds
Peter



[gentoo-user] Re: /etc/locale vs /etc/env.d/02locale?

2011-06-16 Thread Nikos Chantziaras

On 06/16/2011 06:45 PM, Mark Knecht wrote:

Is there a simple explanation concerning the difference between the
two locales I have seen on Gentoo machines?

1) /etc/locale, as specified in the installation documents

2) /etc/env.d/02locale as has been discussed on the list recently


There is no /etc/locale.  I assume you mean /etc/locale.gen.  That one 
only contains the locales for glibc.  You should not specify env vars 
there.  You only list raw locales.  Mine for example has these contents:


  en_US ISO-8859-1
  en_US.UTF-8 UTF-8

/etc/env.d/02locale is of a different format.  It's executed as a 
script, so you set your locale-specific env vars there.  You only need 
LANG actually, and possibly LC_COLLATE.  The whole contents of mine:


  LANG=en_US.UTF-8
  LC_COLLATE=C




Re: [gentoo-user] Re: /etc/locale vs /etc/env.d/02locale?

2011-06-16 Thread Mark Knecht
On Thu, Jun 16, 2011 at 9:22 AM, Nikos Chantziaras rea...@arcor.de wrote:
 On 06/16/2011 06:45 PM, Mark Knecht wrote:

 Is there a simple explanation concerning the difference between the
 two locales I have seen on Gentoo machines?

 1) /etc/locale, as specified in the installation documents

 2) /etc/env.d/02locale as has been discussed on the list recently

 There is no /etc/locale.  I assume you mean /etc/locale.gen.

I did. thanks.

 That one only
 contains the locales for glibc.  You should not specify env vars there.  You
 only list raw locales.  Mine for example has these contents:

  en_US ISO-8859-1
  en_US.UTF-8 UTF-8


As does mine.


 /etc/env.d/02locale is of a different format.  It's executed as a script, so
 you set your locale-specific env vars there.  You only need LANG actually,
 and possibly LC_COLLATE.  The whole contents of mine:

  LANG=en_US.UTF-8
  LC_COLLATE=C


I had the first line but not the second which I've added.

I think the root of my question is really the (possibly) unfortunately
use of the word 'locale' for the glibc stuff. I understand the concept
of locales for the system and users, but why does glibc need locales
which are possibly different from those in use on a system by users?

I can make up reasons, like someone from Japan logs into my server to
do work and needs something to use Japanese locales, but he could
likely set those up in .bashrc or something. What is glibc doing with
them?

Thanks,
Mark



[gentoo-user] Re: /etc/locale vs /etc/env.d/02locale?

2011-06-16 Thread Nikos Chantziaras

On 06/16/2011 07:23 PM, Mark Knecht wrote:

On Thu, Jun 16, 2011 at 9:00 AM, Paul Hartman
paul.hartman+gen...@gmail.com  wrote:

On Thu, Jun 16, 2011 at 10:45 AM, Mark Knechtmarkkne...@gmail.com  wrote:

Is there a simple explanation concerning the difference between the
two locales I have seen on Gentoo machines?

1) /etc/locale, as specified in the installation documents

2) /etc/env.d/02locale as has been discussed on the list recently


I'm not near a Gentoo machine right now, but off the top of my head IIRC:

/etc/locale.gen contains a list of locales to be compiled when glibc
is emerged. These will be available to be used.

/etc/env.d/02locale specifies which of those locales you actually want
to use for the system-wide default (the LC variables)


Thanks for the response Paul.

Does that mean that the /etc/locale.gen is used only by glibc and not
really by the system? If so, what is glibc doing with these beyond
letting me system run programs?


It allows you to have locales to use in /etc/env.d/02locale ;-)  If you 
want to set LANG=en_US.UTF-8 in 02locale, you of course need the files 
for that specific locale/encoding.  To get them, you need to write 
en_US.UTF-8 UTF-8 in locale.gen.  Not sure why you're not getting the 
comments in your locale.gen, but here there are, at the top of the file:


# /etc/locale.gen: list all of the locales you want to have on your system
#
# The format of each line:
# locale charmap
#
# Where locale is a locale located in /usr/share/i18n/locales/ and
# where charmap is a charmap located in /usr/share/i18n/charmaps/.
#
# All blank lines and lines starting with # are ignored.
#
# For the default list of supported combinations, see the file:
# /usr/share/i18n/SUPPORTED
#
# Whenever glibc is emerged, the locales listed here will be automatically
# rebuilt for you.  After updating this file, you can simply run 
`locale-gen`

# yourself instead of re-emerging glibc.




[gentoo-user] Re: /etc/locale vs /etc/env.d/02locale?

2011-06-16 Thread Nikos Chantziaras

On 06/16/2011 07:45 PM, Mark Knecht wrote:

I think the root of my question is really the (possibly) unfortunately
use of the word 'locale' for the glibc stuff.


locale.gen looks a bit cryptic, but the gen refers to generating 
locales.  To have locales available for use, they need to be generated 
first.