diff --git a/etc/defaults.conf b/etc/defaults.conf index bd1322921d5..ef9cd48f4f1 100644 --- a/etc/defaults.conf +++ b/etc/defaults.conf @@ -39,7 +39,8 @@ XBPS_SUCMD="sudo /bin/sh -c" # [OPTIONAL] # Enable or disable ccache when building packages. The ccache directory -# is stored in the hostdir, i.e hostdir/ccache. +# is stored in the hostdir, i.e hostdir/ccache. For go builds this enables +# caching in hostdir/gocache. # #XBPS_CCACHE=yes diff --git a/xbps-src b/xbps-src index f4d74a5a642..76c292e61e3 100755 --- a/xbps-src +++ b/xbps-src @@ -621,6 +621,10 @@ else export CCACHE_COMPILERCHECK=content CCACHE_COMPRESS=1 export PATH="$CCACHEPATH:$PATH" mkdir -p $CCACHE_DIR + + export GOCACHE="${XBPS_HOSTDIR}/gocache" + else + export GOCACHE=off fi if [ -n "$XBPS_DISTCC" ]; then if [ -n "$XBPS_CCACHE" ]; then