Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 788448 - app-arch/brotli-1.0.9-r3[python] fails in prepare phase (cp: cannot stat '<snip>/work/brotli-1.0.9_build': No such file or directory)
Summary: app-arch/brotli-1.0.9-r3[python] fails in prepare phase (cp: cannot stat '<sn...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Craig Andrews
URL:
Whiteboard:
Keywords: PMASKED, PullRequest
Depends on:
Blocks:
 
Reported: 2021-05-06 05:44 UTC by Stuart Meya
Modified: 2021-09-02 16:53 UTC (History)
19 users (show)

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


Attachments
emerge --info (emerge_info.txt,22.32 KB, text/plain)
2021-05-06 05:45 UTC, Stuart Meya
Details
build.log (build.log,4.35 KB, text/x-log)
2021-05-06 05:49 UTC, Stuart Meya
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Meya 2021-05-06 05:44:45 UTC
Hey,

seems like brotli-1.0.9-r3 can't get emerged, because of an error in the prepare phase. 

 * python3_8: copying to /var/tmp/portage/app-arch/brotli-1.0.9-r3/work/brotli-1.0.9_build-python3_8
cp: cannot stat '/var/tmp/portage/app-arch/brotli-1.0.9-r3/work/brotli-1.0.9_build': No such file or directory
 * ERROR: app-arch/brotli-1.0.9-r3::gentoo failed (prepare phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called src_prepare
 *   environment, line 5297:  Called distutils-r1_src_prepare
 *   environment, line 3018:  Called distutils-r1_python_prepare_all
 *   environment, line 2909:  Called python_copy_sources
 *   environment, line 4677:  Called multibuild_copy_sources
 *   environment, line 4005:  Called multibuild_foreach_variant '_multibuild_create_source_copy'
 *   environment, line 4037:  Called _multibuild_run '_multibuild_create_source_copy'
 *   environment, line 4035:  Called _multibuild_create_source_copy
 *   environment, line 4003:  Called die
 * The specific snippet of code:
 *           cp -p -R "${cp_args[@]}" "${_MULTIBUILD_INITIAL_BUILD_DIR}" "${BUILD_DIR}" || die

Build.log an emerge --info attached.
Comment 1 Stuart Meya 2021-05-06 05:45:26 UTC
Created attachment 706284 [details]
emerge --info
Comment 2 Stuart Meya 2021-05-06 05:49:41 UTC
Created attachment 706290 [details]
build.log
Comment 3 Andreas Proteus 2021-05-06 09:47:09 UTC
Strangely when I did:
ebuild /usr/portage/app-arch/brotli/brotli-1.0.9-r2.ebuild {prepare, compile, merge} 
to see what was going wrong the error did not happen and it merged fine.
Comment 4 Andreas Proteus 2021-05-06 09:57:04 UTC
Please ignore my previous post. It is all wrong.
Comment 5 Agostino Sarubbo gentoo-dev 2021-05-06 13:09:53 UTC
This issue has been reproduced right now. Internal ref: ci
Comment 6 Guilherme Amadio gentoo-dev 2021-05-06 13:12:04 UTC
I've hit this in two machines, one normal Gentoo and one prefix.
Comment 7 Ionen Wolkens gentoo-dev 2021-05-06 14:19:08 UTC
1.0.9-r2 is still fine, so it's from the cmake-utils -> cmake conversion

From a quick look seems(?) related to BUILD_DIR being set in global scope by cmake.eclass and distutils picking it up (cmake-utils used to leave it blank until cmake-utils_src_configure).
Comment 8 Craig Andrews gentoo-dev 2021-05-06 20:43:32 UTC
CC'ing kde@gentoo.org since it's maintainer of cmake.eclass

I'm unsure of how to fix this issue... I'm hoping someone will provide a bit of direction :)
Comment 9 Ionen Wolkens gentoo-dev 2021-05-07 02:13:58 UTC
(In reply to Craig Andrews from comment #8)
> I'm unsure of how to fix this issue... I'm hoping someone will provide a bit
> of direction :)
Maybe mask -r3 meanwhile? Seems to be hitting many users.
Comment 10 Larry the Git Cow gentoo-dev 2021-05-09 06:33:42 UTC
The bug has been referenced in the following commit(s):

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

commit 9c324cd0014326c90203b67579fae7a614076e76
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-05-09 06:33:02 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-05-09 06:33:02 +0000

    profiles: mask broken =app-arch/brotli-1.0.9-r3 for now
    
    Bug: https://bugs.gentoo.org/788448
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/package.mask | 5 +++++
 1 file changed, 5 insertions(+)
Comment 11 Alex Xu (Hello71) 2021-05-09 17:37:59 UTC
diff --git a/app-arch/brotli/brotli-1.0.9-r3.ebuild b/app-arch/brotli/brotli-1.0.9-r3.ebuild
index 9a372fb3166..388f6d86d48 100644
--- a/app-arch/brotli/brotli-1.0.9-r3.ebuild
+++ b/app-arch/brotli/brotli-1.0.9-r3.ebuild
@@ -42,8 +42,8 @@ PATCHES=(
 )
 
 src_prepare() {
-	use python && distutils-r1_src_prepare
 	cmake_src_prepare
+	use python && distutils-r1_src_prepare
 }
 
 multilib_src_configure() {
Comment 12 Ionen Wolkens gentoo-dev 2021-05-10 01:34:52 UTC
(In reply to Alex Xu (Hello71) from comment #11)
> diff --git a/app-arch/brotli/brotli-1.0.9-r3.ebuild
> [...]
That's only a partial fix, will fail in compile phase instead.
Comment 13 Alex Xu (Hello71) 2021-06-25 17:32:11 UTC
it was working for me, but i double-checked and actually it was two changes:

diff --git a/app-arch/brotli/brotli-1.0.9-r3.ebuild b/app-arch/brotli/brotli-1.0.9-r3.ebui>
index c7fb22d4ea7..d6b083cd228 100644
--- a/app-arch/brotli/brotli-1.0.9-r3.ebuild
+++ b/app-arch/brotli/brotli-1.0.9-r3.ebuild
@@ -5,7 +5,6 @@ EAPI=7

 PYTHON_COMPAT=( python3_{8..10} )
 DISTUTILS_OPTIONAL="1"
-DISTUTILS_IN_SOURCE_BUILD="1"
 CMAKE_ECLASS=cmake

 inherit cmake-multilib distutils-r1
@@ -42,8 +41,8 @@ PATCHES=(
 )

 src_prepare() {
-       use python && distutils-r1_src_prepare
        cmake_src_prepare
+       use python && distutils-r1_src_prepare
 }

 multilib_src_configure() {
Comment 14 Larry the Git Cow gentoo-dev 2021-09-02 16:53:09 UTC
The bug has been closed via the following commit(s):

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

commit e971c2fcc9d9d7cf7cbe16a06e33d14cc855d29e
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-08-31 16:37:45 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-09-02 16:46:27 +0000

    app-arch/brotli: EAPI-8 bump, fix IUSE=python
    
    Fix weird ebuild variable order.
    Sync live with release ebuild pypy3 support and ~m68k keyword.
    
    Thanks-to: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
    Closes: https://bugs.gentoo.org/788448
    Package-Manager: Portage-3.0.22, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 app-arch/brotli/brotli-1.0.9-r3.ebuild | 43 ++++++++++++++--------------------
 app-arch/brotli/brotli-9999.ebuild     | 37 +++++++++++++----------------
 2 files changed, 34 insertions(+), 46 deletions(-)

Additionally, it has been referenced in the following commit(s):

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

commit b517bfd14176d3ea338a8950eda5c657c95e1b25
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-08-31 18:22:47 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-09-02 16:46:28 +0000

    profiles: Drop app-arch/brotli-1.0.9-r3 package.mask
    
    Bug: https://bugs.gentoo.org/788448
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 profiles/package.mask | 5 -----
 1 file changed, 5 deletions(-)