The changes related bug 373349 were more aggressive than necessary,
causing the PORTDIR variable to be omitted from config.environ()
calls when the EAPI is defined. We really only need to filter the
PORTDIR variable when the current EAPI requires it.

Fixes: 802e7d0bdd96 ("Do not export PORTDIR & ECLASSDIR in EAPI 7")
Bug: https://bugs.gentoo.org/653230
---
 pym/portage/eapi.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pym/portage/eapi.py b/pym/portage/eapi.py
index cdbbf07fb..b0f993a14 100644
--- a/pym/portage/eapi.py
+++ b/pym/portage/eapi.py
@@ -159,7 +159,7 @@ def _get_eapi_attrs(eapi):
                dots_in_use_flags = (eapi is None or 
eapi_allows_dots_in_use_flags(eapi)),
                empty_groups_always_true = (eapi is not None and 
eapi_empty_groups_always_true(eapi)),
                exports_EBUILD_PHASE_FUNC = (eapi is None or 
eapi_exports_EBUILD_PHASE_FUNC(eapi)),
-               exports_PORTDIR = (eapi is not None and 
eapi_exports_PORTDIR(eapi)),
+               exports_PORTDIR = (eapi is None or eapi_exports_PORTDIR(eapi)),
                exports_ECLASSDIR = (eapi is not None and 
eapi_exports_ECLASSDIR(eapi)),
                feature_flag_test = True,
                feature_flag_targetroot = (eapi is not None and 
eapi_has_targetroot(eapi)),
-- 
2.13.6


Reply via email to