1 |
On 05/08/2016 01:42 PM, Mike Gilbert wrote: |
2 |
> The current description of ROOT makes no sense and just confuses people. |
3 |
> The new description is paraphrased from PMS. |
4 |
|
5 |
The current version is bad, but the PMS version isn't great either. |
6 |
|
7 |
We really need examples for D, ROOT, ED, EROOT, and EPREFIX. |
8 |
When/where/why should they (not) be used? How do they compare/contrast? |
9 |
A lot of people just guess. Our invocation of emake DESTDIR="${D}" |
10 |
pretty well explains $D, but how the rest of them interact is left up to |
11 |
your imagination. |
12 |
|
13 |
We have maybe 150 ebuilds in the tree using $ROOT in src_* functions. |
14 |
Some are bugs, but many look OK to me. Do we really want to say "never" |
15 |
do that? |
16 |
|
17 |
Here's the world's worst bash parser that I used to find them. It |
18 |
doesn't work, but it gives you a list of likely candidates if you run it |
19 |
on every ebuild in gentoo.git. |
20 |
|
21 |
|
22 |
#!/usr/bin/python3 |
23 |
|
24 |
from sys import argv |
25 |
|
26 |
in_src_func = False |
27 |
|
28 |
with open(argv[1]) as f: |
29 |
for line in f: |
30 |
if not in_src_func: |
31 |
if line[0:4] == "src_" and line.rstrip()[-1] == "{": |
32 |
in_src_func = True |
33 |
else: |
34 |
if line.rstrip() == "}": |
35 |
in_src_func = False |
36 |
else: |
37 |
if "$ROOT" in line or "${ROOT}" in line: |
38 |
print(argv[1], ":", line.strip()) |