From 59082fcfab2b7f4272a0bb0f3a812fc779e9f5ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Minier?= Date: Sat, 2 Jan 2010 17:12:47 +0100 Subject: 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. --- pbuilder-buildpackage | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'pbuilder-buildpackage') diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage index 293eecf..91b8659 100755 --- a/pbuilder-buildpackage +++ b/pbuilder-buildpackage @@ -86,6 +86,16 @@ fi recover_aptcache createbuilduser +if [ -n "$CCACHEDIR" ]; then + log "I: Setting up ccache" + if ! [ -d "$BUILDPLACE/$CCACHEDIR" ]; then + mkdir -p "$BUILDPLACE/$CCACHEDIR" + fi + chown -R $BUILDUSERID:$BUILDUSERID "$BUILDPLACE/$CCACHEDIR" + # Unfortunate difference between pbuilder-style and ccache-style config env + # vars :-/ + export CCACHE_DIR="$CCACHEDIR" +fi log "I: Installing the build-deps" executehooks "D" trap saveaptcache_umountproc_cleanbuildplace_trap exit sighup sigpipe -- cgit v1.2.3