>>>>> On Sat, 16 Jul 2022, William Hubbs wrote:

> I could force this in the eclass with the following flow if I know how
> to tell if the ebuild inheriting it is in the main tree or not:

> # in_main_tree is a place holder for a test to see if the ebuld running
> # this is in the tree
>       if [[ -n ${EGO_SUM} && in_main_tree ]]; then
>               eqawarn "EGO_SUM is not allowed in the main tree"
>               eqawarn "This will become a fatal error in the future"
>       fi

>       The only question is, is there a way to reliably tell whether or not
>       we are  in the main tree?

An eclass has no legitimate way to find out in which repository it is.
The rationale is that users should be able to copy ebuilds and eclasses
to their local overlays, and they should work there in the same way.

There is an internal (and undocumented) Portage variable, but that
shouldn't be used.

Ulrich

Attachment: signature.asc
Description: PGP signature

Reply via email to