diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2019-10-01 12:49:49 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-10-01 12:49:49 +0000 |
commit | 3ca7660b664f6e9e95031976781ebcd1435a6ce2 (patch) | |
tree | 97d1fc68a9952c8fb09108e2724ea16083436f0a | |
parent | b1b47140eaf74c83a2f12fbff8971d1087e920a6 (diff) | |
download | abuild-3ca7660b664f6e9e95031976781ebcd1435a6ce2.tar.gz abuild-3ca7660b664f6e9e95031976781ebcd1435a6ce2.tar.bz2 abuild-3ca7660b664f6e9e95031976781ebcd1435a6ce2.tar.xz abuild-3ca7660b664f6e9e95031976781ebcd1435a6ce2.zip |
abuild: only set up ccache in rootbld when USE_CCACHE is set
avoid install ccache and bind mount ~/.ccache when USE_CCACHE is not
set.
This fixes bind mount error when ~/.ccache is missing and USE_CCACHE is
unset.
-rw-r--r-- | abuild.in | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -2176,7 +2176,8 @@ rootbld() { calcdeps $SUDO_APK add --initdb --root "$BUILD_ROOT" --update \ - abuild alpine-base build-base git ccache $hostdeps $builddeps + abuild alpine-base build-base git $hostdeps $builddeps \ + ${USE_CCACHE:+ccache} local bwrap_opts="" options_has "net" || bwrap_opts="$bwrap_opts --unshare-net" @@ -2187,7 +2188,7 @@ rootbld() { --bind "$BUILD_ROOT/$HOME" "$HOME" \ --ro-bind "$HOME/.abuild" "$HOME/.abuild" \ --ro-bind "$aportsgit" "$aportsgit" \ - --bind "$HOME/.ccache" "$HOME/.ccache" \ + ${USE_CCACHE:+ --bind "$HOME/.ccache" "$HOME/.ccache"} \ --bind "$SRCDEST" "$SRCDEST" \ --bind "$BUILD_ROOT/tmp" /tmp \ --bind "$BUILD_ROOT/tmp/src" "$srcdir" \ |