1 |
On Tue, 20 Sep 2016 09:02:41 +0200 |
2 |
Michał Górny <mgorny@g.o> wrote: |
3 |
|
4 |
> Finally, the same though occurred to me as to ulm. People will forget |
5 |
> to update the variable. They will forget to update it when adding, |
6 |
> and they will waste their time on build that is going to fail somewhere |
7 |
> at doinit in the end -- how nice is that? Then, they will forget to |
8 |
> update it when removing and the file will be kept stale. |
9 |
> |
10 |
> Any solution you can try to invent to solve those problems, or make |
11 |
> the system any more friendly, is actually making it more complex, |
12 |
> harder to comprehend and even more costly. |
13 |
|
14 |
Yeah, I'd probably have to scrap most of my suggestions and restrict the design |
15 |
to something that was only an "optional extra" in order to be useful. |
16 |
|
17 |
If I was to re-do the concept, it would be mostly a hashover of what we use in Perl |
18 |
for patches. |
19 |
|
20 |
So a reduced suggestion would be: |
21 |
|
22 |
1. Add a PATCHES var to EAPI7 |
23 |
2. PATCHES is analogous to SRC_URI, a string |
24 |
3. PATCHES supports USE conditionals |
25 |
4. PATCHES is ordered. |
26 |
5. ${FILESDIR} works as it always did |
27 |
6. PATCHES describes components of FILESDIR |
28 |
7. PATCHES is evaluated in terms of USE to yield EFFECTIVE_PATCHES, an array |
29 |
8. Default src_prepare applied eapply to all values in EFFECTIVE_PATCHES |
30 |
9. Items in PATCHES are checked by repoman "they must exist" |
31 |
|
32 |
The difference between this suggestion and the previous one importantly |
33 |
is it can't be used to whitelist, it can only be used to |
34 |
|
35 |
1. Simplify how patches are applied for people who want it |
36 |
2. Add extra assurance to repoman if people use the feature |
37 |
|
38 |
Neither of these are exactly "Compelling" features, but it would |
39 |
in part reduce the work. It would also avoid double-bookkeeping |
40 |
by adding no features that require double-bookkeeping, and would simply be a |
41 |
generalization/enhancement of similar features already found in ebuilds. |
42 |
|
43 |
Anything that needed something more fancy than PATCHES would sill be able |
44 |
to and do its own stuff, and it would simply not get any benefits of repoman |
45 |
side consistency checks. |
46 |
|
47 |
And people who needed extra magic could also do: |
48 |
|
49 |
|
50 |
src_prepare() { |
51 |
# extra stuff |
52 |
default; # does eapply EFFECTIVE_PATCHES && eapply_user |
53 |
} |