Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 798918 - sys-libs/timezone-data: invalid WORKDIR
Summary: sys-libs/timezone-data: invalid WORKDIR
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2021-06-27 14:15 UTC by David Michael
Modified: 2021-06-30 19:15 UTC (History)
2 users (show)

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


Attachments
fix.patch (0001-sys-libs-timezone-data-fix-invalid-WORKDIR-when-cros.patch,981 bytes, patch)
2021-06-27 14:16 UTC, David Michael
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Michael 2021-06-27 14:15:17 UTC
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.
Comment 1 David Michael 2021-06-27 14:16:17 UTC
Created attachment 719601 [details, diff]
fix.patch
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2021-06-28 07:52:15 UTC
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
    }
Comment 3 David Michael 2021-06-28 12:24:42 UTC
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"?
Comment 4 Mike Gilbert gentoo-dev 2021-06-28 15:18:21 UTC
Yeah, I think something is getting lost in translation here.

David's patch looks fine to me, and is probably the simplest solution.
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2021-06-29 08:34:50 UTC
Aha, please ignore my comment then.
Comment 6 Larry the Git Cow gentoo-dev 2021-06-30 18:49:11 UTC
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(-)