1 |
Am Mittwoch, 16. Mai 2018, 09:38:30 CEST schrieb Michał Górny: |
2 |
> W dniu sob, 12.05.2018 o godzinie 14∶20 +0200, użytkownik Gerion Entrup |
3 |
> napisał: |
4 |
> > Hi, |
5 |
> > |
6 |
> > just an idea for now. But what you think about multiversion ebuilds? |
7 |
> > Technically this could be realized with the following line in the ebuild itself: |
8 |
> > ``` |
9 |
> > VERSIONS=( 3.0.11 3.0.12 3.1 ) |
10 |
> > ``` |
11 |
> > |
12 |
> > and the filename without version: |
13 |
> > <dev-category>/<package-name>/<package-name>.ebuild |
14 |
> > |
15 |
> > together with this set of rules: |
16 |
> > 1. If there is an ebuild with had a version in its name, this ebuild is preferred. |
17 |
> > e.g. is a tree consists of "foobar/foobar-1.1.ebuild" and "foobar/foobar.ebuild" for version 1.1 the specific ebuild is taken. |
18 |
> > 2. If the ebuild has the variable VERSIONS specified but also a version in its name, the version in its name is taken. |
19 |
> > 3. There can be only one multiversioned ebuild per package. |
20 |
> > |
21 |
> > Different version keywording can be done as before: |
22 |
> > ``` |
23 |
> > if [[ ${PV} == "3.1" ]] ; then |
24 |
> > KEYWORDS="~amd64 ~x86" |
25 |
> > else |
26 |
> > KEYWORDS="amd64 x86" |
27 |
> > fi |
28 |
> > ``` |
29 |
> > |
30 |
> > The resolution of versions can be done as before, with the difference that one ebuild can represent multiple versions. |
31 |
> > |
32 |
> > The "ebuild" tool needs some adjustments. Maybe it tries to download and build all version per default and has an additional flag to specify a single version. |
33 |
> > |
34 |
> > The advantages of this idea I see are: |
35 |
> > - Ebuilds are written in a multiversion manner anyway, and then get copied (or linked?), so it can be made explicit. |
36 |
> > - The diffs between different versions of ebuilds and the commit history are way more readable. |
37 |
> > - The size of the tree reduces. |
38 |
> > |
39 |
> |
40 |
> In my opinion, this puts more effort into inventing a problem than |
41 |
> solving one. In order to consider a particular idea thouroughly, you |
42 |
> should also consider potential disadvantages, rather than focusing |
43 |
> purely on advantages as you see them. |
44 |
> |
45 |
> While one might think that this will help developers, it is going to be |
46 |
> a maintenance nightmare. Just compare the workflow. |
47 |
> |
48 |
> Currently, adding a patch affecting runtime involves copying the ebuild, |
49 |
> and applying the patch. Later on, the old revision is just removed. |
50 |
> With your solution, you need to adjust VERSIONS, add conditional; later |
51 |
> on, you need to adjust VERSIONS, find all conditionals, remove them. |
52 |
> Not only it involves more work but also increases the risk of accidental |
53 |
> breakage. |
54 |
I'm not sure, if I understand you correctly, so I try to express myself: |
55 |
If an ebuild (say foobar-1.0.ebuild) needs a patch affecting runtime, the |
56 |
current workflow is to copy the ebuild, add the code that applies the patch |
57 |
and do a revbump (to foobar-1.0-r1.ebuild). The old ebuild remains |
58 |
untouched. |
59 |
With the VERSIONS approach, the VERSIONS need to be adjusted to contain |
60 |
the revbump version as well, and add a conditional that applies only in the |
61 |
revbump version the patch and otherwise not. |
62 |
|
63 |
The VERSIONS approach does not break the old mechanism. So if a patch |
64 |
needs to be applied, the multiversion ebuild (that contains other versions |
65 |
as well, say foobar.ebuild with VERSIONS="1.0 1.1 1.2") can just be copied, |
66 |
renamed with the revbump number (to foobar-1.0-r1.ebuild) and completed |
67 |
with the apply line. Once the old versions should be deleted the VERSIONS |
68 |
variable can be adjusted (to VERSIONS="1.1 1.2"). |
69 |
|
70 |
|
71 |
> The arch team work is going to become a nightmare. Currently, they just |
72 |
> use 'ekeyword' tool to mass-edit ebuilds. With your solution, they're |
73 |
> now have to find the correct conditional (or add one), and update |
74 |
> keywords there. I can already imagine monsters like: |
75 |
> |
76 |
> if pv1; then |
77 |
> KEYWORDS="~amd64" |
78 |
> elif pv2; then |
79 |
> KEYWORDS="amd64 ~arm64 x86" |
80 |
> elif pv3; then |
81 |
> KEYWORDS="~amd64 ~arm64 ~x86" |
82 |
> elif pv4; then |
83 |
> KEYWORDS="amd64 ~arm64 ~x86" |
84 |
> fi |
85 |
> |
86 |
> Basically, any action requiring >1 arch team would involve creating |
87 |
> a new version at least temporarily. And I seriously doubt arch teams |
88 |
> would really want to spend time collapsing those afterwards. |
89 |
You are right, I have not thought about that. Maybe the approach of R0b0t1 |
90 |
would work. |
91 |
|
92 |
|
93 |
> The algorithm you presented might look nice at first. But remember that |
94 |
> the developers will now have to do the same thing -- i.e. discover which |
95 |
> ebuild should they look at. You're moving for a clear 1 ebuild : 1 file |
96 |
> mapping to N ebuilds : 1 file. |
97 |
|
98 |
Gerion |