diff mbox

manual: Update LOCPATH documentation

Message ID 5385D5C9.1070503@redhat.com
State New
Headers show

Commit Message

Florian Weimer May 28, 2014, 12:25 p.m. UTC
I noticed that the LOCPATH documentation had bitrotted and did not match 
the current defaults anymore.

It's also a bit odd that we go to great lengths *not* documenting the 
actual format of locale specifiers (mostly the 
language_TERRITORY.codeset@modifier structure), while this format is 
very much part of our public interface and described in the setlocale(3) 
manual page.  What's the current thinking on that?  Should we add this 
to the manual as well?

Comments

Marko Myllynen May 30, 2014, 8:03 a.m. UTC | #1
Hi,

On 2014-05-28 15:25, Florian Weimer wrote:
> I noticed that the LOCPATH documentation had bitrotted and did not match
> the current defaults anymore.

FWIW, LOCPATH is now documented also in the latest man pages, how
searching is done and also a compact example how to use a custom locale
from LOCPATH generated with localedef is provided:

http://man7.org/linux/man-pages/man7/locale.7.html
http://man7.org/linux/man-pages/man1/locale.1.html
http://man7.org/linux/man-pages/man1/localedef.1.html

> It's also a bit odd that we go to great lengths *not* documenting the
> actual format of locale specifiers (mostly the
> language_TERRITORY.codeset@modifier structure), while this format is
> very much part of our public interface and described in the setlocale(3)
> manual page.  What's the current thinking on that?  Should we add this
> to the manual as well?

Sounds like a good idea.

Thanks,
diff mbox

Patch

2014-05-28  Florian Weimer  <fweimer@redhat.com>

	* manual/locale.texi (Setting the Locale): Update documentation of
	the LOCPATH environment variable.

diff --git a/manual/locale.texi b/manual/locale.texi
index 45f1e94..33e8bef 100644
--- a/manual/locale.texi
+++ b/manual/locale.texi
@@ -411,14 +411,19 @@  pointer and leaves the current locale unchanged.
 
 The path used for finding locale data can be set using the
 @code{LOCPATH} environment variable.  The default path for finding
-locale data is system specific.  It is computed from the value given
-as the prefix while configuring the C library.  This value normally is
-@file{/usr} or @file{/}.  For the former the complete path is:
+locale data is system specific.  It is computed from the directory
+specified using @option{--localedir}, @option{--datarootdir}, or
+@option{--prefix} while configuring @theglibc.  The prefix is normally
+set as @file{/usr} or @file{/}.  For the former the complete path for
+the @code{LOCPATH} default value is:
 
 @smallexample
-/usr/lib/locale
+/usr/share/locale
 @end smallexample
 
+The value of @code{LOCPATH} is ignored by privileged programs for
+security reasons.
+
 Here is an example showing how you might use @code{setlocale} to
 temporarily switch to a new locale.