all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 2a814a319bf03138ce3334c17aa22e6eae4ae2c2 1468 bytes (raw)
name: gnu/packages/patches/glibc-guix-locpath.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
 
Honor a special 'GUIX_LOCPATH' environment variable.

This is most useful when using Guix on top of another distro, which uses an
different libc version with incompatible locale data.  In this case, setting
'GUIX_LOCPATH' rather than 'LOCPATH' allows users to tell Guix's libc where to
look for its locale data without breaking programs that use the other libc.

See <https://lists.gnu.org/archive/html/guix-devel/2015-09/msg00717.html> for
some background information.

--- a/locale/newlocale.c
+++ b/locale/newlocale.c
@@ -102,7 +102,9 @@ __newlocale (int category_mask, const char *locale, __locale_t base)
   locale_path = NULL;
   locale_path_len = 0;
 
-  locpath_var = getenv ("LOCPATH");
+  locpath_var = getenv ("GUIX_LOCPATH");
+  if (locpath_var == NULL || locpath_var[0] == '\0')
+    locpath_var = getenv ("LOCPATH");
   if (locpath_var != NULL && locpath_var[0] != '\0')
     {
       if (__argz_create_sep (locpath_var, ':',
diff --git a/locale/setlocale.c b/locale/setlocale.c
index ead030d..ca2337d 100644
--- a/locale/setlocale.c
+++ b/locale/setlocale.c
@@ -251,7 +251,9 @@ setlocale (int category, const char *locale)
   locale_path = NULL;
   locale_path_len = 0;
 
-  locpath_var = getenv ("LOCPATH");
+  locpath_var = getenv ("GUIX_LOCPATH");
+  if (locpath_var == NULL || locpath_var[0] == '\0')
+    locpath_var = getenv ("LOCPATH");
   if (locpath_var != NULL && locpath_var[0] != '\0')
     {
       if (__argz_create_sep (locpath_var, ':',

debug log:

solving 2a814a3 ...
found 2a814a3 in https://yhetil.org/guix/1443736716-8578-2-git-send-email-ludo@gnu.org/

applying [1/1] https://yhetil.org/guix/1443736716-8578-2-git-send-email-ludo@gnu.org/
diff --git a/gnu/packages/patches/glibc-guix-locpath.patch b/gnu/packages/patches/glibc-guix-locpath.patch
new file mode 100644
index 0000000..2a814a3

1:22: trailing whitespace.
 
1:37: trailing whitespace.
 
Checking patch gnu/packages/patches/glibc-guix-locpath.patch...
Applied patch gnu/packages/patches/glibc-guix-locpath.patch cleanly.
warning: 2 lines add whitespace errors.

index at:
100644 2a814a319bf03138ce3334c17aa22e6eae4ae2c2	gnu/packages/patches/glibc-guix-locpath.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.