1 |
I'd be in favor of full-on LC_ALL=C. Ebuilds are meant for having a |
2 |
particular determinism. They're machine scripts. The operations they do |
3 |
need to be consistent. |
4 |
|
5 |
For user-facing parts, such as printing information, or sorting user-shown |
6 |
text, I can understand ebuild authors might want in some special |
7 |
circumstances to run a command with the user's language. For that reason, |
8 |
what if we did this: |
9 |
|
10 |
USER_LANG="$LANG" |
11 |
unset LANG ${!LC_*} |
12 |
export LC_ALL=C |
13 |
|
14 |
That way, ebuild writers could do: |
15 |
|
16 |
LC_ALL="$USER_LANG" einfo "Blah blah $(sort <blah)" |
17 |
|
18 |
While the rest of the actual programmatic part of the ebuild functions |
19 |
deterministically with LC_ALL=C. |
20 |
|
21 |
This seems like a decent compromise... |
22 |
On Nov 11, 2015 4:49 PM, "Ulrich Mueller" <ulm@g.o> wrote: |
23 |
|
24 |
> >>>>> On Wed, 11 Nov 2015, Ciaran McCreesh wrote: |
25 |
> |
26 |
> > On Wed, 11 Nov 2015 07:16:42 +0100 |
27 |
> > Patrick Lauer <patrick@g.o> wrote: |
28 |
> >> Wouldn't it be 'easier' (fsov easy) to have portage use sane-default |
29 |
> >> locale settings, so that estonian or turkish users don't get hit by |
30 |
> >> weirdness in the [a-z] character class etc.? |
31 |
> |
32 |
> > Paludis forces all the LC variables to sane values. A few vocal |
33 |
> > annoying users hate this, and patch it out... |
34 |
> |
35 |
> Unfortunately, that doesn't help us, since ebuilds cannot rely on it. |
36 |
> |
37 |
> Should we revise EAPI 6? It hasn't been cleared for usage in the tree |
38 |
> yet, so should be still possible. Losing such an important feature of |
39 |
> bash-4 seems to be reason enough. (And obviously, some people had been |
40 |
> aware of the problem. Why did nobody speak up before the spec was |
41 |
> approved?) |
42 |
> |
43 |
> Paludis seems to do this: |
44 |
> |
45 |
> unset LANG ${!LC_*} |
46 |
> export LC_ALL=C |
47 |
> |
48 |
> We could just add this to the spec. Alternatively, something less |
49 |
> intrusive, like setting only LC_COLLATE and LC_CTYPE. |
50 |
> |
51 |
> We already have LC_MESSAGES=C in the base profile, per 20130813 |
52 |
> Council decision. |
53 |
> |
54 |
> Ulrich |
55 |
> |