Tobias Gasser wrote:
> as mentionned, LC_ALL and LANG are NOT EXACTLY the same: when the
> script sets LC_ALL each invocation of a subshell prints an error, as
> bash validates the given locale, but setting LANG does not make this
> check.

See the bash sources: locale.c, around line 230 (at least in bash 4.0,
which is the only version I have sources handy for).  Functions
set_locale_var (which warns when setlocale() returns failure) and
set_lang (which has no such warning, but calls reset_locale_vars if
LC_ALL is unset, which calls setlocale but also does not warn).

The former is called when one of the LC_* or TEXTDOMAIN or TEXTDOMAINDIR
variables changes.  The latter is called when LANG changes.

This seems to be *purely* an error checking difference.  If de_CH.UTF8
is not a valid locale string (...and I'm not sure it is valid: that
should be de_CH.UTF-8 I believe, although aliases may exist), then it
still isn't working when you set LANG to that value.  It's just that
bash isn't telling you this.

(Alternately, your locale definitions weren't installed in chapter 5,
and bash is telling you this when you use LC_ALL.)

> thus the easiest is to put "LANG=de_CH.UTF8" into the profile.

As, indeed, we tell users to do in section 7.8.  :-)

Setting LC_ALL in the lfs user's (and root's) home directory in chapters
5 and 6 is done to work around bugs in older glibcs, if I believe the
book text in those sections.

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to