Gentoo Archives: gentoo-dev

From: Andrew Savchenko <bircoph@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] Masterplan for solving LINGUAS problems
Date: Tue, 31 May 2016 17:08:38
Message-Id: 20160531200810.7ec6435cb89337238f6a95d8@gentoo.org
In Reply to: [gentoo-dev] [RFC] Masterplan for solving LINGUAS problems by "Michał Górny"
1 Hi,
2
3 On Tue, 31 May 2016 14:49:26 +0200 Michał Górny wrote:
4 > Hello, everyone.
5 >
6 > Since the previous thread doesn't seem to have brought any good
7 > solution to the problem other than stopping to (ab)use LINGUAS
8 > as USE_EXPAND, I would like to start a RFC on a draft solution that
9 > I'd like afterwards to propose to the Council.
10 >
11 >
12 > Rationale
13 > ---------
14 >
15 > The direct reason for this is that LINGUAS is treated as non-standard
16 > special variable by multiple build systems. This includes the following
17 > problems:
18 >
19 > 1. no localizations are installed if it is set to an empty value (which
20 > happens in EAPI 5 when the ebuild does not use the flags),
21 >
22 > 2. there were historical cases where order of LINGUAS mattered.
23 >
24 > Those problems can't be reasonably solved within the scope of
25 > USE_EXPAND. Furthermore, the use of flags to control localizations is
26 > causing the following problems:
27 >
28 > a. maintaining correct flag list is a serious maintenance burden,
29 > especially that differences in build systems make it hard to figure out
30 > the 'most correct' set automatically,
31 >
32 > b. missing flags result in localizations being silently dropped, with
33 > no clear way (i.e. for QA check) to detect that,
34 >
35 > c. large number of additional USE flags make it pretty much impossible
36 > to limit localizations this way when using binary packages.
37 >
38 >
39 > The plan
40 > --------
41 >
42 > 1. Get approval on INSTALL_MASK GLEP [1] and finish implementing it
43 > in Portage.
44 >
45 > 2. Introduce a new USE_EXPAND that can be used to control localizations
46 > whenever this is really required (dependencies, large files, etc.).
47 > Let's use L10N as a draft name for it.
48 >
49 > 3. Fix all packages using LINGUAS as USE_EXPAND, either by converting
50 > to L10N or by removing the needless flags.
51 >
52 > 4. Remove LINGUAS from USE_EXPAND, therefore removing the special EAPI
53 > rules from the variable.
54 >
55 > 5. Release a news item explaining the users the change,
56 > and the necessary action. Request changing LINGUAS to L10N
57 > in make.conf, and make LINGUAS considered an 'advanced variable' for
58 > implicit localization control (i.e. passed through to build systems).
59 > Recommend clean INSTALL_MASK solution instead.
60 >
61 > The example 'new' make.conf would probably look like:
62 >
63 > # controlling e.g. langpacks
64 > L10N="en_US pl"
65 > # stripping unneeded files
66 > INSTALL_MASK="@linguas -@linguas_pl"
67
68 Users will have extra burden because of this change. We should make
69 user experience simpler, not more and more difficult. With proposed
70 change users will need to manage two lists for the same
71 functionality: L10N and INSTALL_MASK.
72
73 The latter one is being used for many purposes and people may be
74 confused by requirement to put @linguas-like directives there. It's
75 like we'll force to put all USE_EXPAND flags explicitly in the USE
76 variable.
77
78 What about different locales for the same language? E.g. there is
79 ru, ru_RU and ru_RU_0 for Russian (I have no clue what ru_RU_0 is
80 supposed to mean). What are planes for this varians? Will
81 @lingual_ru contain all of them or only some?
82
83 What about man pages? They are also controlled by LINGUAS (at
84 least for some packages), but will be out of control with proposed
85 changes.
86
87 If we are going to do an instant move from LINGUAS to L10N (no
88 graced period as discussed here on another thread), why to rename
89 variable in the first place?
90
91 It will be a nice move towards our users if INSTALL_MASK will be
92 automatically populated based on L10N list with ability to override
93 it if really needed, e.g. user needs L10N for en only (e.g. large
94 docs), but wants some other languages for localization files.
95
96 Best regards,
97 Andrew Savchenko

Replies

Subject Author
[gentoo-dev] Re: [RFC] Masterplan for solving LINGUAS problems Duncan <1i5t5.duncan@×××.net>