From e3f56ecb01ddd4e2f44699984577fdbfaf00a27d Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Fri, 9 Mar 2018 11:42:48 +0000 Subject: [PATCH] xbps-src: support caching go builds Piggyback on the existing XBPS_CCACHE logic to enable/disable. Stored in ${XBPS_HOSTDIR}/gocache. --- etc/defaults.conf | 3 ++- xbps-src | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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