1 |
Dnia 31 maja 2016 23:34:07 CEST, "Jörg Schaible" <joerg.schaible@×××.de> napisał(a): |
2 |
>How can I select different linguas for individual packages with this |
3 |
>approach? |
4 |
|
5 |
Using the currently available mechanisms you could use package.env to alter INSTALL_MASK, e.g.: |
6 |
|
7 |
/etc/portage/env/german: |
8 |
INSTALL_MASK="@l10n -@l10n-de" |
9 |
|
10 |
/etc/portage/package.env: |
11 |
dev-foo/* german |
12 |
|
13 |
However, we will probably deploy a convenient package.install_mask file. |
14 |
|
15 |
>Michał Górny wrote: |
16 |
> |
17 |
>> Hello, everyone. |
18 |
>> |
19 |
>> Since the previous thread doesn't seem to have brought any good |
20 |
>> solution to the problem other than stopping to (ab)use LINGUAS |
21 |
>> as USE_EXPAND, I would like to start a RFC on a draft solution that |
22 |
>> I'd like afterwards to propose to the Council. |
23 |
>> |
24 |
>> |
25 |
>> Rationale |
26 |
>> --------- |
27 |
>> |
28 |
>> The direct reason for this is that LINGUAS is treated as non-standard |
29 |
>> special variable by multiple build systems. This includes the |
30 |
>following |
31 |
>> problems: |
32 |
>> |
33 |
>> 1. no localizations are installed if it is set to an empty value |
34 |
>(which |
35 |
>> happens in EAPI 5 when the ebuild does not use the flags), |
36 |
>> |
37 |
>> 2. there were historical cases where order of LINGUAS mattered. |
38 |
>> |
39 |
>> Those problems can't be reasonably solved within the scope of |
40 |
>> USE_EXPAND. Furthermore, the use of flags to control localizations is |
41 |
>> causing the following problems: |
42 |
>> |
43 |
>> a. maintaining correct flag list is a serious maintenance burden, |
44 |
>> especially that differences in build systems make it hard to figure |
45 |
>out |
46 |
>> the 'most correct' set automatically, |
47 |
>> |
48 |
>> b. missing flags result in localizations being silently dropped, with |
49 |
>> no clear way (i.e. for QA check) to detect that, |
50 |
>> |
51 |
>> c. large number of additional USE flags make it pretty much |
52 |
>impossible |
53 |
>> to limit localizations this way when using binary packages. |
54 |
>> |
55 |
>> |
56 |
>> The plan |
57 |
>> -------- |
58 |
>> |
59 |
>> 1. Get approval on INSTALL_MASK GLEP [1] and finish implementing it |
60 |
>> in Portage. |
61 |
>> |
62 |
>> 2. Introduce a new USE_EXPAND that can be used to control |
63 |
>localizations |
64 |
>> whenever this is really required (dependencies, large files, etc.). |
65 |
>> Let's use L10N as a draft name for it. |
66 |
>> |
67 |
>> 3. Fix all packages using LINGUAS as USE_EXPAND, either by converting |
68 |
>> to L10N or by removing the needless flags. |
69 |
>> |
70 |
>> 4. Remove LINGUAS from USE_EXPAND, therefore removing the special |
71 |
>EAPI |
72 |
>> rules from the variable. |
73 |
>> |
74 |
>> 5. Release a news item explaining the users the change, |
75 |
>> and the necessary action. Request changing LINGUAS to L10N |
76 |
>> in make.conf, and make LINGUAS considered an 'advanced variable' for |
77 |
>> implicit localization control (i.e. passed through to build systems). |
78 |
>> Recommend clean INSTALL_MASK solution instead. |
79 |
>> |
80 |
>> The example 'new' make.conf would probably look like: |
81 |
>> |
82 |
>> # controlling e.g. langpacks |
83 |
>> L10N="en_US pl" |
84 |
>> # stripping unneeded files |
85 |
>> INSTALL_MASK="@linguas -@linguas_pl" |
86 |
>> |
87 |
>> |
88 |
>> Your thoughts? |
89 |
>> |
90 |
>> |
91 |
>> [1]:https://wiki.gentoo.org/wiki/User:MGorny/GLEP:INSTALL_MASK |
92 |
>> |
93 |
|
94 |
|
95 |
-- |
96 |
Best regards, |
97 |
Michał Górny (by phone) |