1 |
Mart Raudsepp <leio@g.o> wrote: |
2 |
> Ühel kenal päeval, K, 01.06.2016 kell 20:24, kirjutas Martin Vaeth: |
3 |
>> Gentoo has chosen this name so that as a side effect of setting |
4 |
>> USE=linguas_* you also get a correct LINGUAS variable exported |
5 |
>> (according to the USE-settings and your settings and according |
6 |
>> to the ebuild's IUSE.) |
7 |
>> These are the package with LINGUAS options in their USE flags |
8 |
>> which you mentioned above. |
9 |
> |
10 |
> People already set LINGUAS for autotools control; using the same for |
11 |
> USE_EXPAND probably seemed natural to re-use that, but the effects on |
12 |
> PM variable mangling wasn't thought about at the time. |
13 |
|
14 |
At least, it looks like it was well-thought: |
15 |
It avoided errors like "language xxx not supported", |
16 |
it gave the user control to set it easily on a per-peckage basis, |
17 |
and most important, it made the package manager aware of the LINGUAS |
18 |
used and handle binary packages correctly. |
19 |
From the user perspective it had only advantages. |
20 |
If all these positive side effects were not the original intention, |
21 |
it was a very good accident that it happened. |
22 |
|
23 |
> There were no problems, and there still are no problem with implicit |
24 |
> LINGUAS handling (by means of not listing them in IUSE), as long as the |
25 |
> package manager doesn't modify the variable set in make.conf. |
26 |
|
27 |
As long as there is only one setting valid for all packages |
28 |
and all systems on which one will ever install the binary package. |
29 |
A quite unrealistic setting for quite some use cases. |
30 |
|
31 |
> The user has set it explicitly somewhere (make.conf most likely) and |
32 |
> simply gets honored in upstream build system, just like CFLAGS. |
33 |
|
34 |
That handling of CFLAGS is bad enough - no reason to repeat this mistake: |
35 |
This is usable only if you have only one architecture but not in a |
36 |
hybrid setup with e.g. roughly compatible machines where e.g. you change |
37 |
CFLAGS by /etc/portage/env or /etc/portage/package.env (or locally |
38 |
in the environment) to compile for another machine or in a ways |
39 |
compatible for another machine, etc. |
40 |
|
41 |
Well, for CFLAGS, CXXFLAGS, LDFLAGS at least the |
42 |
variables actually used are stored in |
43 |
/var/db/cat/pkg/{CFLAGS,CXXFLAGS,LDFLAGS} |
44 |
and similarly stored in the metadata of binary packages (not |
45 |
hidden in some hard-to-parse compressed environment file), |
46 |
so that the package manager _could_ check their validity |
47 |
(and even if it does not - which AFAIK is the case currently - |
48 |
it is not very hard to write a script which does this). |
49 |
|
50 |
That's why I suggested that - as the very least - if you really want |
51 |
to kill all the current advantages for no reason, at the very least |
52 |
handle LNGUAS not even *worse* than CFLAGS and at least store them |
53 |
in a new /var/db variable so that - if you already let the user do |
54 |
the job which the package manager is supposed to do - at least the |
55 |
user can write his own scripts to do portage's job. |
56 |
(Of course, this scripts can never work as good as the current |
57 |
solution if you really kill it, because these scripts are lacking |
58 |
the information which LINGUAS are actually supported by the package.) |
59 |
|
60 |
> LINGUAS does not imply any order whatsoever. Packages that assumed so |
61 |
> were seriously buggy and if any still remain, this needs to be fixed |
62 |
> ASAP. |
63 |
|
64 |
So if you consider this as a non-issue, I see even less reason |
65 |
why to remove the *transpararent* (to the package manager and user) |
66 |
IUSE=linguas_* and go back to the intransparant LINGUAS=... |
67 |
(I am not complaining about a renaming of the IUSE, as long as |
68 |
this IUSE in the end affects LINUGAS) |
69 |
|
70 |
> Including them all in IUSE for simple translation catalogs is not |
71 |
> feasible to maintain. |
72 |
|
73 |
I disagree. The list of packages is in most cases very easy to get |
74 |
(e.g. ls po/*.po) and inserting it correctly is a usually a |
75 |
one-time thing. For bumping, one will have to check for dependency |
76 |
changes anyway, and that a package adds a new language without listing |
77 |
it in its ChangeLog is also very rare. |
78 |
|
79 |
> And yes, there are packages that have 196 different language and |
80 |
> dialects translations. Even core GNOME packages [...] |
81 |
|
82 |
Nevertheless these packages are very rare. One could also manage |
83 |
*one* list of all languages globally and allow to use it for |
84 |
convenience for such cases (if a few of the listed languages are |
85 |
actually not provided, nothing critical will happen: The |
86 |
user's output has perhaps a few more entries than necessary and |
87 |
perhaps an unnecessary rebuild can happen if the user |
88 |
selects/deselects an exotic language.) |
89 |
|
90 |
> It also clutters emerge --verbose --pretend or --ask output hard with |
91 |
> LINGUAS="long list of 196 language codes" |
92 |
|
93 |
About the situation which we currently have (e.g. k3b): For some |
94 |
packages the LINGUAS list is not 1 line but 2-4. So what? |
95 |
If this really is an issue for somebody (I don't consider it some), |
96 |
then one can discuss to add an option to suppress the LINGUAS output |
97 |
for those not interested in it. |
98 |
But it's certainly not a reason to make it *intransparent* for the |
99 |
package manager and user. |
100 |
|
101 |
> these and mixes it all up for when the information is more useful |
102 |
> when it implies huge extra downloads. |
103 |
|
104 |
This happens always with USE-flags: Unless you look at the |
105 |
ebuild source, you never know whether it will trigger dependencies, |
106 |
increase the download time, increase the build time (and how much), |
107 |
increase mount of installed data (and how much) etc. |
108 |
Just because that information is not listed, it does not make having |
109 |
the USE-flags less useful. There is no difference to linguas-specific |
110 |
USE-flags. |
111 |
|
112 |
> The point is that if the USE_EXPAND is renamed, then a LINGUAS as found |
113 |
> in make.conf will just get passed verbatim into the environment (as |
114 |
> parsed in via shlex - make.conf is not bash sourced), and then honored |
115 |
> by upstream build system. |
116 |
|
117 |
Yes, exeactly: Intransparent implicit handling as a side effect, |
118 |
instead of a transparent and reliable handling through the |
119 |
package manager. |
120 |
We had this hackish handling before IUSE=linguas_* |
121 |
was introduced, which was a big relief for a lot of people. |
122 |
Now the suggestion is to turn back to the hacks, excusing |
123 |
the hack by declaring setting/changing LINGUAS a |
124 |
thing for the "advanced" user, only. |
125 |
|
126 |
> I don't see anything hackish in just setting L10N for extra language |
127 |
> support downloads and LINGUAS for UI translations. |
128 |
|
129 |
Setting LINGUAS without awareness of the package manager of it |
130 |
*is* a hack. |
131 |
|
132 |
> You can find it in the VDB packed in environment.* in case of portage. |
133 |
|
134 |
Now, don't tell me that the necessity to write code which uncompresses |
135 |
a library and parses the tricky escape handling of the environment |
136 |
file to get eventually you own hackish script to do what the |
137 |
package manager should be suppposed to do, is anything else than |
138 |
an even bad hack. |
139 |
|
140 |
> Exporting it specially like CFLAGS, CXXFLAGS, FEATURES and others are, |
141 |
> is a separate matter if one wants to propose that later. |
142 |
|
143 |
It would at least turn a really bad hack into a little bit less bad hack. |
144 |
But it is of course never as good as a real transparent solution |
145 |
with USE-flags. |
146 |
|
147 |
>> Where our opinions strongly differ is whether a way to |
148 |
>> cleanly set LINGUAS should be provided (e.g. by allowing |
149 |
>> IUSE=l10n_* to modify LINGUAS appropriately, and make this |
150 |
>> the "good" way instead calling it a "broken" way which |
151 |
>> should be avoided.) |
152 |
> |
153 |
> I don't believe I have read such a claim from his e-mails anywhere, so |
154 |
> not sure what this is about. |
155 |
|
156 |
My the suggestion to make this (export LINGUAS based on |
157 |
IUSE=linguas_*/l10n_*) as the default solution in l10n.eclass |
158 |
(which is the current place where this thing happens implicitly |
159 |
through the name) was replied with: |
160 |
|
161 |
: This eclass should be killed with fire as ugly nonsense [...] |
162 |
: As far as I'm concerned, it may not exist, be broken or whatever. |
163 |
|
164 |
>> For instance, the default language of mplayer will depend on |
165 |
>> the first entry of LINGUAS [...] |
166 |
> |
167 |
> This is not the case since long ago as far as I look, as it was a bug |
168 |
> and fixed long ago. |
169 |
|
170 |
Then even more, I think that LINGUAS should be implicitly set by through |
171 |
USE-flags: If order does not matter, there is absolutely no reason to do |
172 |
not do it transparatenly this way. |