commit:     3628eaf7d4691c249943e9059ba2ddc60253ba82
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 16 01:33:59 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Apr 17 02:22:00 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=3628eaf7

config.environ(): filter PORTDIR only when required (bug 653230)

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)),

Reply via email to