Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#69478 - [pacman] makepkg/biuldenv_ccache(): export CCACHE_BASEDIR="$srcdir" by default

Attached to Project: Arch Linux
Opened by bartus (bartus) - Saturday, 30 January 2021, 23:51 GMT
Last edited by Toolybird (Toolybird) - Wednesday, 20 September 2023, 23:40 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No


Currently `buildenv/` exports `CCACHE_BASEDIR="$srcdir"` in the `buildenv_distcc()` only when combination of ccache/distcc is set 2c72c8b822d21c45a8020e49f03691830f3bcff2 It doesn't effect `distcc/ccache` build as compiler paths relative to `/` and not `CCACHE_BASEDIR` so `ccache` omittes them during rewriting paths to relative.

I propose moving `CCACHE_BASEDIR=$srcdir` up to `buildenv_ccache()` as default, those allowing reusing the cache when building packages in temporary location instead requiring building in same location.

Btw. we're already setting `C{,XX}FLAGS+=" -fdebug-prefix-map=$srcdir=${DBGSRCDIR:-/usr/src/debug}" those allowing `ccache` to hash debug builds in abstraction from build path.

Currently I have to insert `export CCACHE_BASEDIR="$srcdir"` at the begging of each PKGBUILD `build()` function to allow reusing the cache when building in temporary changing location.
This task depends upon

Closed by  Toolybird (Toolybird)
Wednesday, 20 September 2023, 23:40 GMT
Reason for closing:  Upstream
Additional comments about closing:  See comments
Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.
Comment by Toolybird (Toolybird) - Wednesday, 20 September 2023, 23:40 GMT
pacman issues and feature requests now live "upstream" in the Arch GitLab instance [1]. If this request is still valid, please resubmit it there. Thanks.