When cross-compiling, the ebuild uses the directory "${WORKDIR}-native" for a copy of the source. The existence of this new directory prevents portage from cleaning up /var/tmp/portage after the build. Here is a patch to keep the default ${S} so it uses "${WORKDIR}/${P}-native" instead.
Created attachment 719601 [details, diff] fix.patch
It's unusual to see `src_unpack()` to be overridden. That is normally responsible for upstream source(s) unpacking without local modifications. I suggest plugging it to existing src_prepare() under tc-is-cross-compiler: src_prepare() { default # check_web contacts validator.w3.org sed -i -e 's/check_tables check_web/check_tables/g' \ Makefile || die "Failed to disable check_web" tc-is-cross-compiler && cp -pR "${S}" "${S}"-native }
How can I add that in src_prepare when it has already filled WORKDIR at that point? It can't recursively copy a directory into itself. Should I assume there won't be any hidden source files and run "cp -pR * ${S}/.native"?
Yeah, I think something is getting lost in translation here. David's patch looks fine to me, and is probably the simplest solution.
Aha, please ignore my comment then.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b7a3b0f83668f4519cda92e9195c2abe0ce44e0 commit 5b7a3b0f83668f4519cda92e9195c2abe0ce44e0 Author: David Michael <fedora.dm0@gmail.com> AuthorDate: 2021-06-27 14:15:58 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2021-06-30 18:48:52 +0000 sys-libs/timezone-data: fix invalid WORKDIR when cross-compiling Closes: https://bugs.gentoo.org/798918 Package-Manager: Portage-3.0.20, Repoman-3.0.2 Signed-off-by: David Michael <fedora.dm0@gmail.com> Signed-off-by: Mike Gilbert <floppym@gentoo.org> sys-libs/timezone-data/timezone-data-2021a-r1.ebuild | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)