Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 701506 - distutils-r1.eclass: DISTUTILS_IN_SOURCE_BUILD + any-r1 API may result in 'cd' to missing BUILD_DIR (was: dev-python/jinja-2.10.3-r1 - cd: /var/tmp/portage/dev-python/jinja-2.10.3-r1/work/jinja-2.10.3-python3_8: No such file or directory)
Summary: distutils-r1.eclass: DISTUTILS_IN_SOURCE_BUILD + any-r1 API may result in 'cd...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
: 701488 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-11-30 00:41 UTC by email200202
Modified: 2019-12-01 21:32 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,19.13 KB, text/plain)
2019-11-30 00:42 UTC, email200202
Details
emerge -pqv '=dev-python/jinja-2.10.3-r1::gentoo' (file_701506.txt,214 bytes, text/plain)
2019-11-30 00:43 UTC, email200202
Details
emerge --info '=dev-python/jinja-2.10.3-r1::gentoo' (file_701506.txt,6.88 KB, text/plain)
2019-11-30 00:44 UTC, email200202
Details

Note You need to log in before you can comment on or make changes to this bug.
Description email200202 2019-11-30 00:41:17 UTC
dev-python/jinja-2.10.3-r1 failed with message:

 * python3_8: running distutils-r1_run_phase python_compile_all
/var/tmp/portage/dev-python/jinja-2.10.3-r1/temp/environment: line 976: cd: /var/tmp/portage/dev-python/jinja-2.10.3-r1/work/jinja-2.10.3-python3_8: No such file or directory
 * ERROR: dev-python/jinja-2.10.3-r1::gentoo failed (compile phase):
 *   (no error message)
 * 


Reproducible: Always

Steps to Reproduce:
1. emerge --sync
2. emerge -auvDN world

Actual Results:  
dev-python/jinja-2.10.3-r1 failed to build

Expected Results:  
dev-python/jinja-2.10.3-r1 should not fail
Comment 1 email200202 2019-11-30 00:42:35 UTC
Created attachment 597936 [details]
build.log
Comment 2 email200202 2019-11-30 00:43:41 UTC
Created attachment 597938 [details]
emerge -pqv '=dev-python/jinja-2.10.3-r1::gentoo'
Comment 3 email200202 2019-11-30 00:44:26 UTC
Created attachment 597940 [details]
emerge --info '=dev-python/jinja-2.10.3-r1::gentoo'
Comment 4 email200202 2019-12-01 12:42:45 UTC
It compiles if you add python3_8 to PYTHON_TARGETS in make.conf.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-12-01 13:01:26 UTC
I'll check this later today.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-12-01 13:03:37 UTC
In the meantime, could somebody include eclass-debug.log?
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-12-01 13:05:37 UTC
Never mind, I see it's USE=-doc. I see the problem now.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-12-01 15:39:25 UTC
Ok, so the problem is that the DISTUTILS_IN_SOURCE_BUILD API assumes each phase is run in BUILD_DIR (which normally is a copy of S).  However, any-r1 API assumes that the common phases may be run for impl that isn't being built at all, so the BUILD_DIR may not exist.  Normally, this isn't a problem since BUILD_DIR is not being used.  However, if you mix the two...

I'm still wondering what the correct solution to this should be.  We might just stay in S if BUILD_DIR doesn't exist.  We may also try creating it (copying S) when needed for any-r1 API.
Comment 9 Larry the Git Cow gentoo-dev 2019-12-01 20:19:47 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9b70d39ab2c06e476f3e8dc09d1d8f16e74e099

commit f9b70d39ab2c06e476f3e8dc09d1d8f16e74e099
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-12-01 16:12:55 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-12-01 20:19:34 +0000

    distutils-r1.eclass: Handle missing BUILD_DIR for any-r1 API
    
    When any-r1 API is used for *_all sub-phases, an implementation that
    was not selected by the user may be used.  In this case,
    DISTUTILS_IN_SOURCE_BUILD will not create the BUILD_DIR for this
    implementation; however, the phase runner will still try to enter it
    and fail.  Handle this gracefully by falling back to ${S}.
    
    Closes: https://bugs.gentoo.org/701506
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 eclass/distutils-r1.eclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-12-01 21:32:37 UTC
*** Bug 701488 has been marked as a duplicate of this bug. ***