1 |
On 16/01/2018 01:40, Alec Warner wrote: |
2 |
> |
3 |
> |
4 |
> On Mon, Jan 15, 2018 at 7:05 PM, Francesco Riosa <vivo75@×××××.com |
5 |
> <mailto:vivo75@×××××.com>> wrote: |
6 |
> |
7 |
> |
8 |
> |
9 |
> On 15/01/2018 18:07, Mike Gilbert wrote: |
10 |
> > On Mon, Jan 15, 2018 at 10:27 AM, Francesco Riosa |
11 |
> <vivo75@×××××.com <mailto:vivo75@×××××.com>> wrote: |
12 |
> >> In late 2015 ${PYTHON_COMPAT_OVERRIDE} has been standardized |
13 |
> and added |
14 |
> >> to all python eclasses, it's useful for developers that want |
15 |
> test and |
16 |
> >> mark the package for newer versions of python. |
17 |
> >> |
18 |
> >> However (unless I'm missing something) PYTHON_COMPAT_OVERRIDE |
19 |
> is not |
20 |
> >> usable if: |
21 |
> >> - the user want only python 2.7 and 3.6 (latest) installed |
22 |
> >> no python 3.5 |
23 |
> >> - don't want to mess dependencies (the warnings in the eclass |
24 |
> are scary) |
25 |
> >> |
26 |
> >> So, what can be done to let the user choose it's preferred python |
27 |
> >> version(s) without having to build it's own overlay? |
28 |
> >> |
29 |
> >> One solution is to change ebuilds in tree to include a user |
30 |
> variable in |
31 |
> >> the PYTHON* arrays, example: |
32 |
> >> |
33 |
> >> -PYTHON_COMPAT=( python3_{4,5} ) |
34 |
> >> +PYTHON_COMPAT=( python3_{4,5} ${PYTHON_COMPAT_ADD} ) |
35 |
> >> |
36 |
> >> if someone want to bet that packages are ok with 3.6/latest |
37 |
> (even before |
38 |
> >> a developer tested it) then add PYTHON_COMPAT_ADD=python3_6 to |
39 |
> >> /etc/portage/make.conf and run egencache. |
40 |
> > I like the idea to inject values into PYTHON_COMPAT instead of |
41 |
> > overriding it completely. I'm pretty sure this can/should be |
42 |
> > implemented in the eclass without touching ebuilds. |
43 |
> In my mind that was to leave ebuilds developers the ability to opt |
44 |
> out, |
45 |
> but well that could also be done in the eclasses. |
46 |
> Opt out could be beneficial for packages that only support python 2.7, |
47 |
> or where there are known and documented problems with different python |
48 |
> versions. |
49 |
> > |
50 |
> > I'm not sure I really like the idea of affecting the other metadata |
51 |
> > variables. I can see your point about wanting to remove python |
52 |
> > versions that would otherwise satisfy dependencies. If metadata is |
53 |
> > modified this way, it would definitely be "unsupported". |
54 |
> I've not tought about remove python versions, only add them |
55 |
> (beneficial |
56 |
> for users that like to use experimental python versions) |
57 |
> However the supported python version are translated and build |
58 |
> important |
59 |
> cached variables IUSE, DEPEND, etc. so there is no way to cleanly |
60 |
> modify |
61 |
> those variable after the cache has been generated. |
62 |
> The only viable option is to regenerate, update or delete it. |
63 |
> |
64 |
> > |
65 |
> > As far as implementation, you would probably need to write the |
66 |
> patches for this. |
67 |
> If there is consensus that's not a problem, cannot guarantee to be |
68 |
> fast |
69 |
> however |
70 |
> > |
71 |
> > Also, I expect the QA team might have some objections, so you |
72 |
> may want |
73 |
> > to discuss it with them (especially mgorny) before spending too much |
74 |
> > time on it. |
75 |
> I'd like to hear mgorny opinions but that should be a more extended |
76 |
> decision than only QA and the python eclasses developer(s). |
77 |
> If nothing else because deciding that sometimes may be good to let the |
78 |
> user break the cache is a global decision and documentation need to be |
79 |
> added. |
80 |
> |
81 |
> |
82 |
> I'm seeing less value in this being a 'cache-breaking' exercise and |
83 |
> more value in it simply being a custom eclass. |
84 |
> |
85 |
> If you hoist the eclass into an overlay and modify it (e.g. to set the |
86 |
> var and get the deps you want) the caching |
87 |
> all works out fine. |
88 |
> |
89 |
> 1. The source of the data is the hoisted eclass. |
90 |
> 2. The eclass mtime changed. |
91 |
> 3. package managers can see that and update cache metadata for |
92 |
> inheriting ebuilds. |
93 |
> 4. Bonus, once the cache is generated we have a valid means to see if |
94 |
> the cache remains valid. |
95 |
> 5. Double bonus, any ebuilds not inheriting the eclass are unaffected. |
96 |
> |
97 |
> I'm not sure why this is so onerous. |
98 |
> |
99 |
> -A |
100 |
That's a good idea, in the past I've failed to completely understand how |
101 |
portage inherit eclasses in overlays, but if I can figure that out |
102 |
probably this could be a solution. |
103 |
Also depending from the magnitude of changes the four python eclasses |
104 |
need and the correlated maintenance burden. |