[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Using ccache with sbuild/schroot



On Saturday 24,October,2009 10:59 PM, Ryan Kavanagh wrote:
> Hi list,
> Has anybody setup ccache in an LVM schroot for sbuild and if so, how? My
> blocking point is that sbuild uses an LVM snapshot of the schroot to build a
> package, which means that any cached compiling would get lost at the end of the
> build.
> 
> If anybody knows of a way to make this work, or to decrease compile times some
> other way, please let me know :)
> 
> Cheers and thanks,
> Ryan
Find a way to bind-mount (mount -o bind / mount --bind) the ccache directory
into the chroot. That way, it won't be lost. In the case of pbuilder, I have
this in my .pbuilderrc:

# ccache stuff
mkdir -p /var/cache/pbuilder/ccache
chmod a+w /var/cache/pbuilder/ccache
export CCACHE_DIR=/var/cache/pbuilder/ccache
export PATH="/usr/lib/ccache:${PATH}"
EXTRAPACKAGES=ccache
BINDMOUNTS=${CCACHE_DIR}


-- 
Kind regards,
Chow Loong Jin

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: