From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QXGAZ-0007Rd-Do for garchives@archives.gentoo.org; Thu, 16 Jun 2011 17:15:54 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7A9CFE055E for ; Thu, 16 Jun 2011 17:15:49 +0000 (UTC) Received: from ksp.sk (element.ksp.sk [158.195.16.154]) by pigeon.gentoo.org (Postfix) with ESMTP id CA03E1C0A4 for ; Thu, 16 Jun 2011 16:56:25 +0000 (UTC) Received: by ksp.sk (Postfix, from userid 1004) id C4DE34C1C3; Thu, 16 Jun 2011 18:56:24 +0200 (CEST) Date: Thu, 16 Jun 2011 18:56:24 +0200 From: YoYo Siska To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] /etc/locale vs /etc/env.d/02locale? Message-ID: <20110616165624.GA16859@ksp.sk> References: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-YoYo: 47 X-Exotic-Header-Data: 47/2 User-Agent: Mutt/1.5.21 (2010-09-15) X-Archives-Salt: X-Archives-Hash: 6f5e53ae657b399970387aeaef4ee23b On Thu, Jun 16, 2011 at 09:23:16AM -0700, Mark Knecht wrote: > On Thu, Jun 16, 2011 at 9:00 AM, Paul Hartman > wrote: > > On Thu, Jun 16, 2011 at 10:45 AM, 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 > > > > 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? > > If 02locale specifies what the system is using, then should it be > 02locale that's in the install documents vs off in an optional Gentoo > Localization guide? > > Note that the /etc/locale.gen stuff is marked optional in the guide so > presumably it isn't actually needed. All I've determined about it is > that it reduces the amount of time emerge spends buildingglibc/gcc. locale.gen is in the install docs, because it allows you to choose which locales should be built, ie after emerging libc, which locales you can choose from... if you don't modify it, you get a lot of usual locales built... /etc/env.d/02locale is used to actually choose which one of the built ones will be used as the "default" locale for (almost) everything that runs... I gues it might deserve a mention in the install guide... though it actullly isn't any special file... the actuall locale is set by setting an enviroment variable (LANG or the specific LC_...), you could set it in your .bashrc / .bash_profile only for your user, or anywhere where it would apply to most programs, ie /etc/profile ... Gentoo has the mechanism, that anything that gets put into /etc/env.d is then (through env-update, which you have certainly run from time to time ;) merged together to /etc/profile.env, which is in turned sourced by /etc/profile (and posibly other things) so that it is just logical to put it there... but the actual name of the file doesn't really matter ;) yoyo