1 |
We have a pull request for the devmanual that will update the revision |
2 |
documentation; namely, when to create a new one: |
3 |
|
4 |
https://github.com/gentoo/devmanual.gentoo.org/pull/67 |
5 |
|
6 |
The comments bring up an issue that I think can benefit from some |
7 |
hindsight. Specifically, the PR says that it's OK to change IUSE without |
8 |
creating a revision, because users can use --changed-use to catch it. |
9 |
My immediate objection to that was that --changed-use is specific to |
10 |
Portage, but let's reflect on the status quo. |
11 |
|
12 |
|
13 |
== The situation now == |
14 |
|
15 |
1 We tell everyone to update with either --newuse or --changed-use. |
16 |
|
17 |
2 Developers change IUSE without new revisions. |
18 |
|
19 |
3 To facilitate (1) and (2), Portage has the --changed-use and |
20 |
--newuse flags. Paludis has a family of "--keep" options to avoid |
21 |
reinstallation, e.g. --keep=if-same-metadata. And pkgcore has its |
22 |
own (different) --newuse flag. |
23 |
|
24 |
4 There is no specification for the features in (3), and each package |
25 |
manager has taken a different approach. |
26 |
|
27 |
|
28 |
The end result is that Portage users do see the changes made to IUSE |
29 |
without a revision, but at a cost: |
30 |
|
31 |
* They have to pass the "required" --changed-use or --newuse flags to |
32 |
every command. |
33 |
|
34 |
* The same cannot be said for users of other package managers. |
35 |
|
36 |
* Lots of PM code exists to handle this stuff. |
37 |
|
38 |
* Our documentation needs to describe the above (relatively) |
39 |
complicated situation. |
40 |
|
41 |
|
42 |
And with one notable benefit: |
43 |
|
44 |
* We don't need to rename the ebuild to change IUSE, and in theory we |
45 |
can control when rebuilds happen. |
46 |
|
47 |
|
48 |
|
49 |
== New revisions for USE flag changes == |
50 |
|
51 |
I suggest that in hindsight, we can do better. Suppose we require a new |
52 |
revision for every change to IUSE. Then, |
53 |
|
54 |
* We can delete all of the PM code for --changed-use and --newuse and |
55 |
friends. |
56 |
|
57 |
* The documentation becomes much simpler: revbump if IUSE changes. |
58 |
|
59 |
* Users can omit --newuse and --changed-use from their lives. |
60 |
|
61 |
* All package managers now handle IUSE changes properly. |
62 |
|
63 |
* emerge runs a bit faster. |
64 |
|
65 |
This has none of the downsides of the current approach. Of course, it |
66 |
lacks that one benefit -- that you don't have to rename the ebuild when |
67 |
you change IUSE. Now I'll try to convince you that the rename and |
68 |
associated rebuilds aren't that big of a deal. |
69 |
|
70 |
|
71 |
Q. But what about the rebuilds? |
72 |
|
73 |
For most packages, the rebuilds simply don't matter. Unless you're |
74 |
the maintainer of libreoffice, firefox, chromium, etc. -- just do the |
75 |
revision and forget about the (quick) rebuilds. |
76 |
|
77 |
We tell everyone to use --changed-use and --newuse if they want |
78 |
things to work, so they were probably going to rebuild anyway. |
79 |
|
80 |
|
81 |
Q. But what if I maintain firefox, and I need to change IUSE? |
82 |
|
83 |
If the IUSE change isn't important, just make the new revision in a |
84 |
branch and wait to commit it later when there are more changes |
85 |
piled up. If it is important (like if its default value changes |
86 |
RDEPEND), then it would have required a revision anyway. |
87 |
|
88 |
|
89 |
Q. But I work on a team, and we can't all work in different branches. |
90 |
|
91 |
If you work on a massive package and if you're collaborating with |
92 |
others regularly, you can commit the new ebuild masked. This is |
93 |
annoying, but is an extremely rare combination of circumstances. |
94 |
|
95 |
|
96 |
== tl;dr == |
97 |
|
98 |
We would be better off with respect to IUSE changes and revisions if we |
99 |
deleted the --changed-use and --newuse flags right now, and just |
100 |
required developers to revbump when changing IUSE. |
101 |
|
102 |
Package managers get simpler, documentation gets simpler, the user |
103 |
interface gets simpler, and behavior becomes more uniform and predictable. |
104 |
|
105 |
Please let me know what you think. |