Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sun, 01 Dec 2019 20:20:27
Message-Id: 1575231574.f9b70d39ab2c06e476f3e8dc09d1d8f16e74e099.mgorny@gentoo
1 commit: f9b70d39ab2c06e476f3e8dc09d1d8f16e74e099
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 1 16:12:55 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 1 20:19:34 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9b70d39
7
8 distutils-r1.eclass: Handle missing BUILD_DIR for any-r1 API
9
10 When any-r1 API is used for *_all sub-phases, an implementation that
11 was not selected by the user may be used. In this case,
12 DISTUTILS_IN_SOURCE_BUILD will not create the BUILD_DIR for this
13 implementation; however, the phase runner will still try to enter it
14 and fail. Handle this gracefully by falling back to ${S}.
15
16 Closes: https://bugs.gentoo.org/701506
17 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
18
19 eclass/distutils-r1.eclass | 6 +++++-
20 1 file changed, 5 insertions(+), 1 deletion(-)
21
22 diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
23 index f44f0aee9c2..0c5d6781f83 100644
24 --- a/eclass/distutils-r1.eclass
25 +++ b/eclass/distutils-r1.eclass
26 @@ -821,7 +821,11 @@ distutils-r1_run_phase() {
27 debug-print-function ${FUNCNAME} "${@}"
28
29 if [[ ${DISTUTILS_IN_SOURCE_BUILD} ]]; then
30 - if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
31 + # only force BUILD_DIR if implementation is explicitly enabled
32 + # for building; any-r1 API may select one that is not
33 + # https://bugs.gentoo.org/701506
34 + if [[ ! ${DISTUTILS_SINGLE_IMPL} ]] &&
35 + has "${EPYTHON/./_}" ${PYTHON_TARGETS}; then
36 cd "${BUILD_DIR}" || die
37 fi
38 local BUILD_DIR=${BUILD_DIR}/build