1 |
>>>>> On Sat, 17 Sep 2016, Kent Fredric wrote: |
2 |
|
3 |
> Just an idea that seemed obvious enough and obviously missing. |
4 |
|
5 |
> 1. Have, in a future EAPI, a variable (I'm going to call it "FILES" as |
6 |
> a stand-in for now ). |
7 |
|
8 |
> 2. FILES contains an array (or perhaps whitespace delimited string) of |
9 |
> entries (or perhaps expressions) relative to |
10 |
> ${repository_location}/${CATEGORY}/${PN}/files/ |
11 |
|
12 |
> 3. Each entry in FILES dictates that the given file is "Used by" the |
13 |
> ebuild. |
14 |
|
15 |
Do you mean "file" in its Unix meaning here, i.e. including |
16 |
directories? Or only regular files? |
17 |
|
18 |
> 4. the FILES variable is expanded and interpreted during package |
19 |
> sourcing |
20 |
|
21 |
> 5. "repoman full" and "repoman ci" must ensure any entry listed in FILES |
22 |
> exists |
23 |
|
24 |
> 6. "repoman full" and "repoman ci" must ensure any use of ${FILESDIR} |
25 |
> without a declared FILES variable is a failure. |
26 |
|
27 |
> 7. Under this future EAPI, the location of where ${FILESDIR} expands to |
28 |
> changes to a location within |
29 |
> ${PORTAGE_TEMPDIR}/portage/${CATEGORY}/${PF}/files |
30 |
|
31 |
> 8. The contents of ${PORTAGE_TEMPDIR}/portage/${CATEGORY}/${PF}/files |
32 |
> is generated from the source-time $FILES entry by mapping entries from |
33 |
> ${repostory_location}, either by symlink or by copy (though copy is |
34 |
> preferred to avoid potential side effects), mapping their heirachy |
35 |
> exactly ( that is, preserving directory structure ) |
36 |
|
37 |
> 9. Files not listed in/indicated by $FILES are thus unavailable to the |
38 |
> ebuild at runtime and will not be seen in ${FILESDIR}, even if they are |
39 |
> in ${repository_location} |
40 |
|
41 |
AFAICS that proposal goes into a direction which is somewhat opposite |
42 |
to what we have pursued in EAPI 6. There, we have allowed directories |
43 |
as arguments to eapply, in order to simplify application of patchsets. |
44 |
Now maintainers would have to list all single files contained in the |
45 |
directory again. |
46 |
|
47 |
Also I am not sure if I like the additional burden imposed on ebuild |
48 |
maintainers by requiring double bookkeeping. FILESDIR is already a |
49 |
well defined location for the support files needed by a package. |
50 |
|
51 |
> :: Benefits :: |
52 |
|
53 |
> [...] |
54 |
|
55 |
> 4. Due to referential integrity, it should be trivial to identify which |
56 |
> files are needed by a given ebuild, and which files are now redundant, |
57 |
> assisting with keeping the tree pruned. |
58 |
|
59 |
How does a file in FILESDIR get stale? The typical scenario is that a |
60 |
patch will no longer be needed after a version bump and pruning of old |
61 |
ebuild versions. I fear that with FILES the problem would simply be |
62 |
shifted: instead of forgetting to delete the stale file, people would |
63 |
forget removing the patch from the FILES list. |
64 |
|
65 |
Ulrich |