1 |
On Thu, Jun 16, 2011 at 09:23:16AM -0700, Mark Knecht wrote: |
2 |
> On Thu, Jun 16, 2011 at 9:00 AM, Paul Hartman |
3 |
> <paul.hartman+gentoo@×××××.com> wrote: |
4 |
> > On Thu, Jun 16, 2011 at 10:45 AM, Mark Knecht <markknecht@×××××.com> wrote: |
5 |
> >> Is there a simple explanation concerning the difference between the |
6 |
> >> two locales I have seen on Gentoo machines? |
7 |
> >> |
8 |
> >> 1) /etc/locale, as specified in the installation documents |
9 |
> >> |
10 |
> >> 2) /etc/env.d/02locale as has been discussed on the list recently |
11 |
> > |
12 |
> > I'm not near a Gentoo machine right now, but off the top of my head IIRC: |
13 |
> > |
14 |
> > /etc/locale.gen contains a list of locales to be compiled when glibc |
15 |
> > is emerged. These will be available to be used. |
16 |
> > |
17 |
> > /etc/env.d/02locale specifies which of those locales you actually want |
18 |
> > to use for the system-wide default (the LC variables) |
19 |
> |
20 |
> Thanks for the response Paul. |
21 |
> |
22 |
> Does that mean that the /etc/locale.gen is used only by glibc and not |
23 |
> really by the system? If so, what is glibc doing with these beyond |
24 |
> letting me system run programs? |
25 |
> |
26 |
> If 02locale specifies what the system is using, then should it be |
27 |
> 02locale that's in the install documents vs off in an optional Gentoo |
28 |
> Localization guide? |
29 |
> |
30 |
> Note that the /etc/locale.gen stuff is marked optional in the guide so |
31 |
> presumably it isn't actually needed. All I've determined about it is |
32 |
> that it reduces the amount of time emerge spends buildingglibc/gcc. |
33 |
|
34 |
locale.gen is in the install docs, because it allows you to choose which |
35 |
locales should be built, ie after emerging libc, which locales you can |
36 |
choose from... if you don't modify it, you get a lot of usual locales |
37 |
built... |
38 |
|
39 |
/etc/env.d/02locale is used to actually choose which one of the built |
40 |
ones will be used as the "default" locale for (almost) everything that |
41 |
runs... I gues it might deserve a mention in the install guide... |
42 |
though it actullly isn't any special file... the actuall locale is set |
43 |
by setting an enviroment variable (LANG or the specific LC_...), you |
44 |
could set it in your .bashrc / .bash_profile only for your user, or |
45 |
anywhere where it would apply to most programs, ie /etc/profile ... |
46 |
Gentoo has the mechanism, that anything that gets put into /etc/env.d is |
47 |
then (through env-update, which you have certainly run from time to time |
48 |
;) merged together to /etc/profile.env, which is in turned sourced by |
49 |
/etc/profile (and posibly other things) so that it is just logical to |
50 |
put it there... but the actual name of the file doesn't really matter ;) |
51 |
|
52 |
|
53 |
yoyo |