1 |
>>>>> On Sat, 16 Jul 2022, William Hubbs wrote: |
2 |
|
3 |
> I could force this in the eclass with the following flow if I know how |
4 |
> to tell if the ebuild inheriting it is in the main tree or not: |
5 |
|
6 |
> # in_main_tree is a place holder for a test to see if the ebuld running |
7 |
> # this is in the tree |
8 |
> if [[ -n ${EGO_SUM} && in_main_tree ]]; then |
9 |
> eqawarn "EGO_SUM is not allowed in the main tree" |
10 |
> eqawarn "This will become a fatal error in the future" |
11 |
> fi |
12 |
|
13 |
> The only question is, is there a way to reliably tell whether or not |
14 |
> we are in the main tree? |
15 |
|
16 |
An eclass has no legitimate way to find out in which repository it is. |
17 |
The rationale is that users should be able to copy ebuilds and eclasses |
18 |
to their local overlays, and they should work there in the same way. |
19 |
|
20 |
There is an internal (and undocumented) Portage variable, but that |
21 |
shouldn't be used. |
22 |
|
23 |
Ulrich |