1 |
As I haven't seen any objections from council members against revising |
2 |
EAPI 6, please find a patch below. |
3 |
|
4 |
It is worded in a way that LC_ALL=C, as currently done by Paludis, |
5 |
will conform to it. A setting like LC_COLLATE=C LC_CTYPE=en_GB.UTF-8 |
6 |
is also allowed, or even LC_ALL=C.UTF-8 if such a locale should appear |
7 |
in glibc at some point. |
8 |
|
9 |
Please review. |
10 |
|
11 |
Ulrich |
12 |
|
13 |
|
14 |
From 047046e00b2fdd53939ff81d2cfb2adabf4118f9 Mon Sep 17 00:00:00 2001 |
15 |
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@g.o> |
16 |
Date: Thu, 12 Nov 2015 07:55:26 +0100 |
17 |
Subject: [PATCH] EAPI 6: Ensure sane settings for LC_COLLATE and LC_CTYPE. |
18 |
|
19 |
Some locales (e.g. tr_TR) change the upper/lowercase mapping for ASCII |
20 |
characters, which breaks the tr(1) command and the case-modifying word |
21 |
expansions of Bash version 4. |
22 |
|
23 |
Therefore, ensure that LC_COLLATE and LC_CTYPE behave in the same way |
24 |
as the C locale for characters in the ASCII range. |
25 |
--- |
26 |
eapi-differences.tex | 4 ++++ |
27 |
ebuild-env-vars.tex | 19 +++++++++++++++++++ |
28 |
2 files changed, 23 insertions(+) |
29 |
|
30 |
diff --git a/eapi-differences.tex b/eapi-differences.tex |
31 |
index d4a90e0..aa1e482 100644 |
32 |
--- a/eapi-differences.tex |
33 |
+++ b/eapi-differences.tex |
34 |
@@ -132,6 +132,9 @@ Parallel tests & \compactfeatureref{parallel-tests} & |
35 |
\t{MERGE\_TYPE} & \compactfeatureref{merge-type} & |
36 |
No & No & Yes & Yes & Yes \\ |
37 |
|
38 |
+Sane locale settings & \compactfeatureref{locale-settings} & |
39 |
+ Undefined & Undefined & Undefined & Undefined & Yes \\ |
40 |
+ |
41 |
Profile \t{IUSE} injection & \compactfeatureref{profile-iuse-inject} & |
42 |
No & No & No & Yes & Yes \\ |
43 |
|
44 |
@@ -345,6 +348,7 @@ EAPI 6 is EAPI 5 with the following changes: |
45 |
\item Bash version is 4.2, \featureref{bash-version}. |
46 |
\item Default \t{src\_prepare} no longer a no-op, \featureref{src-prepare-6}. |
47 |
\item Different \t{src\_install} implementation, \featureref{src-install-6}. |
48 |
+\item \t{LC\_COLLATE} and \t{LC\_CTYPE} compatible with C locale, \featureref{locale-settings}. |
49 |
\item \t{failglob} is enabled in global scope, \featureref{failglob}. |
50 |
\item \t{einstall} banned, \featureref{banned-commands}. |
51 |
\item \t{die} and \t{assert} called with \t{-n} respect \t{nonfatal}, \featureref{nonfatal-die}. |
52 |
diff --git a/ebuild-env-vars.tex b/ebuild-env-vars.tex |
53 |
index 8a9be0e..d577d1e 100644 |
54 |
--- a/ebuild-env-vars.tex |
55 |
+++ b/ebuild-env-vars.tex |
56 |
@@ -292,6 +292,25 @@ package manager specific directories. |
57 |
\t{GZIP}, \t{BZIP}, \t{BZIP2}, \t{CDPATH}, \t{GREP\_OPTIONS}, \t{GREP\_COLOR} and \t{GLOBIGNORE} |
58 |
must not be set. |
59 |
|
60 |
+\featurelabel{locale-settings} The package manager must ensure that the \t{LC\_COLLATE} and |
61 |
+\t{LC\_CTYPE} locale categories are equivalent to the C or POSIX locale, as far as characters |
62 |
+in the ASCII range (U+0000 to U+007F) are concerned. Only for EAPIs listed in such a manner in |
63 |
+table~\ref{tab:locale-settings}. |
64 |
+ |
65 |
+\ChangeWhenAddingAnEAPI{6} |
66 |
+\begin{centertable}{Locale settings for EAPIs} |
67 |
+ \label{tab:locale-settings} |
68 |
+ \begin{tabular}{ll} |
69 |
+ \toprule |
70 |
+ \multicolumn{1}{c}{\textbf{EAPI}} & |
71 |
+ \multicolumn{1}{c}{\textbf{Sane \t{LC\_COLLATE} and \t{LC\_CTYPE}?}} \\ |
72 |
+ \midrule |
73 |
+ 0, 1, 2, 3, 4, 5 & Undefined \\ |
74 |
+ 6 & Yes \\ |
75 |
+ \bottomrule |
76 |
+ \end{tabular} |
77 |
+\end{centertable} |
78 |
+ |
79 |
\subsection{USE and IUSE Handling} |
80 |
\label{sec:use-iuse-handling} |
81 |
|
82 |
-- |
83 |
2.6.3 |