1 |
On 21 May 2016 at 19:41, Michał Górny <mgorny@g.o> wrote: |
2 |
> Hello, |
3 |
> |
4 |
> |
5 |
> Those of you who read my blog post on LINGUAS [1] may already know |
6 |
> what's going on. For those who didn't, short summary: |
7 |
> |
8 |
> In EAPI 5 and newer, all variables listed in USE_EXPAND are supposed to |
9 |
> be unconditionally exported with their values reduced to enabled USE |
10 |
> flags listed in IUSE. In particular, this means that if ebuild does not |
11 |
> list any linguas_* flags in IUSE, PM exports *empty* LINGUAS (i.e. |
12 |
> disables all localizations with the implicit gettext behavior). |
13 |
> |
14 |
> Portage had so far some ugly hack-logic that tried to keep LINGUAS |
15 |
> working somehow in place. However, the patches to enable PMS-compliant |
16 |
> behavior are on their way, so it's about time to decide what to do |
17 |
> about LINGUAS. |
18 |
> |
19 |
> |
20 |
> I see the following possibilities: |
21 |
> |
22 |
> 1. We start explicitly listing linguas_* in all ebuilds, no matter how |
23 |
> tiny they are. Maintainers are required to keep IUSE up-to-date |
24 |
> and users are forced to rebuild a lot. This is also a QA violation |
25 |
> in terms of invalid use of USE flags. |
26 |
> |
27 |
> 2. We hack-unset LINGUAS in ebuilds. This is a lot of effort, easy to |
28 |
> miss and probably would need to repeated for every single phase anyway |
29 |
> due to how global variables are handled in PMS. Additionally, it may |
30 |
> break at some point since those variables are likely expected to be |
31 |
> read-only anyway. |
32 |
> |
33 |
> 3. We remove LINGUAS from USE_EXPAND and stop using it. If ebuilds have |
34 |
> a good reason to use flags for localization, we introduce a new, |
35 |
> non-colliding USE_EXPAND for that. We also ask users to replace LINGUAS |
36 |
> with the new flag in their make.conf files. LINGUAS gets the original |
37 |
> upstream behavior back, and we eventually discourage it in favor of new |
38 |
> INSTALL_MASK features (WiP) [2]. |
39 |
> |
40 |
> 4. We fix build systems not to do magic depending on whether LINGUAS |
41 |
> is unset or set-to-empty. Instead, we could some special special value |
42 |
> like '-' to signify not installing localizations at all. But that's |
43 |
> upstream thing to do, and breaks backwards compatibility with existing |
44 |
> systems disabling localizations. |
45 |
> |
46 |
> |
47 |
> Your thoughts? |
48 |
|
49 |
I think its a regretful situation we find ourselves in where |
50 |
portage/PMS control values that have to go via ENV, leak beyond ENV |
51 |
into packaging. |
52 |
|
53 |
This has already been a bit of a worry for us, because we may have |
54 |
wanted to use PERL_ as a prefix for env vars in an eclass, but there's |
55 |
a possibility of accidentally picking the same ENV var that is |
56 |
inherently used in some perl part. |
57 |
( And at very least, `perl -V` shows all ENV vars that are prefixed |
58 |
with PERL_ .... eg: PERL_MOM_YOURS=1 perl -V ) |
59 |
|
60 |
Though I just don't see how we can generically avoid that scope |
61 |
leakage, because this is bash, and we're short on private ways to pass |
62 |
control values around, other than going crazy on functions. |
63 |
|
64 |
The only thing I thought of when reading the writeup was tagged |
65 |
install mask verbs. |
66 |
|
67 |
That is: |
68 |
|
69 |
- Always install all language support possible by default. |
70 |
- Have an ebuild mapping of some description that annotates "files X |
71 |
add support for languages ( y, z, x )" |
72 |
|
73 |
And then maybe you'd have a parameterized INSTALL_MASK system where you could do |
74 |
|
75 |
INSTALL_MASK_RULES="linguas(-* en)" |
76 |
|
77 |
Then it would be "Packager decides" if they want to trip a rebuild at |
78 |
the end user when they "discovered" certain files pertain to specific |
79 |
language support. |
80 |
|
81 |
Then the only reason you'd need USE flags is if you wanted to toggle |
82 |
compile time support that pulled in dependencies to support the |
83 |
language in question. |
84 |
|
85 |
|
86 |
-- |
87 |
Kent |
88 |
|
89 |
KENTNL - https://metacpan.org/author/KENTNL |