Gentoo Archives: gentoo-dev

From: Daniel Campbell <zlg@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] Masterplan for solving LINGUAS problems
Date: Tue, 31 May 2016 17:36:56
Message-Id: bae0cd40-3a80-a70f-c608-7a4b62e4d2ff@gentoo.org
In Reply to: Re: [gentoo-dev] [RFC] Masterplan for solving LINGUAS problems by Daniel Campbell
1 On 05/31/2016 10:31 AM, Daniel Campbell wrote:
2 > On 05/31/2016 05:49 AM, Michał Górny wrote:
3 >> Hello, everyone.
4 >>
5 >> Since the previous thread doesn't seem to have brought any good
6 >> solution to the problem other than stopping to (ab)use LINGUAS
7 >> as USE_EXPAND, I would like to start a RFC on a draft solution that
8 >> I'd like afterwards to propose to the Council.
9 >>
10 >>
11 >> Rationale
12 >> ---------
13 >>
14 >> The direct reason for this is that LINGUAS is treated as non-standard
15 >> special variable by multiple build systems. This includes the following
16 >> problems:
17 >>
18 >> 1. no localizations are installed if it is set to an empty value (which
19 >> happens in EAPI 5 when the ebuild does not use the flags),
20 >>
21 >> 2. there were historical cases where order of LINGUAS mattered.
22 >>
23 >> Those problems can't be reasonably solved within the scope of
24 >> USE_EXPAND. Furthermore, the use of flags to control localizations is
25 >> causing the following problems:
26 >>
27 >> a. maintaining correct flag list is a serious maintenance burden,
28 >> especially that differences in build systems make it hard to figure out
29 >> the 'most correct' set automatically,
30 >>
31 >> b. missing flags result in localizations being silently dropped, with
32 >> no clear way (i.e. for QA check) to detect that,
33 >>
34 >> c. large number of additional USE flags make it pretty much impossible
35 >> to limit localizations this way when using binary packages.
36 >>
37 >>
38 >> The plan
39 >> --------
40 >>
41 >> 1. Get approval on INSTALL_MASK GLEP [1] and finish implementing it
42 >> in Portage.
43 >>
44 >> 2. Introduce a new USE_EXPAND that can be used to control localizations
45 >> whenever this is really required (dependencies, large files, etc.).
46 >> Let's use L10N as a draft name for it.
47 >>
48 >> 3. Fix all packages using LINGUAS as USE_EXPAND, either by converting
49 >> to L10N or by removing the needless flags.
50 >>
51 >> 4. Remove LINGUAS from USE_EXPAND, therefore removing the special EAPI
52 >> rules from the variable.
53 >>
54 >> 5. Release a news item explaining the users the change,
55 >> and the necessary action. Request changing LINGUAS to L10N
56 >> in make.conf, and make LINGUAS considered an 'advanced variable' for
57 >> implicit localization control (i.e. passed through to build systems).
58 >> Recommend clean INSTALL_MASK solution instead.
59 >>
60 >> The example 'new' make.conf would probably look like:
61 >>
62 >> # controlling e.g. langpacks
63 >> L10N="en_US pl"
64 >> # stripping unneeded files
65 >> INSTALL_MASK="@linguas -@linguas_pl"
66 >>
67 >>
68 >> Your thoughts?
69 >>
70 >>
71 >> [1]:https://wiki.gentoo.org/wiki/User:MGorny/GLEP:INSTALL_MASK
72 >>
73 >
74 > I think this idea has some potential, but would there be a way for a
75 > user to choose L10N *or* INSTALL_MASK instead of both? If I understand
76 > correctly, a person who wanted all of their system to be en_US only, but
77 > wanted to take part in translation of some other project, would need to
78 > add the other locales directly to L10N, then somehow mask them out for
79 > other packages. Or the reverse: leave L10N="en_US" or something, and
80 > somehow enable other languages in that specific package.
81 >
82 > Is there a package-level option for this? Users can set their locales in
83 > /etc/locale.gen, and that handles things globally, but what about the
84 > user that doesn't want to include that for all of their packages? This
85 > seems like an all-or-nothing thing, lacking in granularity. If I'm
86 > wrong, please clarify so I can understand better.
87 >
88
89 I forgot to include that I think the INSTALL_MASK groups, even if not
90 implemented for this issue, are a great idea. It would allow users to
91 target specific things like "get rid of info pages", "no systemd unit
92 files", etc, in a way that is controlled by the repo (or an override in
93 /etc/portage somewhere). It prevents more ebuild bloat, too.
94
95 --
96 Daniel Campbell - Gentoo Developer
97 OpenPGP Key: 0x1EA055D6 @ hkp://keys.gnupg.net
98 fpr: AE03 9064 AE00 053C 270C 1DE4 6F7A 9091 1EA0 55D6

Attachments

File name MIME type
signature.asc application/pgp-signature