aboutsummaryrefslogtreecommitdiff
path: root/pbuilder-checkparams
diff options
context:
space:
mode:
authorLoïc Minier <lool@dooz.org>2010-01-02 17:12:47 +0100
committerLoïc Minier <lool@dooz.org>2010-01-02 17:15:32 +0100
commit59082fcfab2b7f4272a0bb0f3a812fc779e9f5ba (patch)
treec3d13e71335ee6ec35b79971f0a259b2bc890932 /pbuilder-checkparams
parentadf712fc4a1037f68d19aa30c0f010d3e1588153 (diff)
downloadpbuilder-59082fcfab2b7f4272a0bb0f3a812fc779e9f5ba.tar
pbuilder-59082fcfab2b7f4272a0bb0f3a812fc779e9f5ba.tar.gz
Add builtin ccache support, enabled by default
Add builtin support for using ccache in pbuilder and enable it by default. Ship a new /var/cache/pbuilder/ccache dir and bind-mount and chown it to BUILDUSERID at build time. Install/remove ccache automatically on create/update if CCACHEDIR is set/unset. Update docs and remove old ccache config example. Add a NEWS entry featuring the change.
Diffstat (limited to 'pbuilder-checkparams')
-rwxr-xr-xpbuilder-checkparams7
1 files changed, 7 insertions, 0 deletions
diff --git a/pbuilder-checkparams b/pbuilder-checkparams
index ba0a24d..2e350d0 100755
--- a/pbuilder-checkparams
+++ b/pbuilder-checkparams
@@ -297,5 +297,12 @@ case "$PBCURRENTCOMMANDLINEOPERATION" in
;;
esac
+if [ -n "$CCACHEDIR" ]; then
+ if [ -d "$CCACHEDIR" ]; then
+ BINDMOUNTS="$BINDMOUNTS $CCACHEDIR"
+ fi
+ export PATH="/usr/lib/ccache:$PATH"
+fi
+
# sort BINDMOUNTS to ensure that deeper directories are mounted last
BINDMOUNTS="$(for i in $BINDMOUNTS; do echo $i; done | sort -u)"