xbps-src: added XBPS_CCACHE option to xbps-src.conf.

If set /usr/lib/ccache/bin will be added to PATH as the first entry,
*only* for chroot.
This commit is contained in:
Juan RP 2011-07-02 09:15:29 +02:00
parent 5c55f940ae
commit cbdfc216de
2 changed files with 10 additions and 2 deletions

View file

@ -249,8 +249,11 @@ if [ -z "$in_chroot" ]; then
MYPATH="$XBPS_MASTERDIR/usr/local/bin:$MYPATH"
MYPATH="$XBPS_MASTERDIR/usr/local/sbin:$MYPATH"
else
if [ -n "$XBPS_CCACHE" ]; then
CCACHEPATH="/usr/lib/ccache/bin"
fi
# In chroot always prefer tools from bootstrap.
MYPATH="/usr/lib/ccache/bin:/tools/bin:/usr/local/sbin:/usr/local/bin"
MYPATH="$CCACHEPATH:/tools/bin:/usr/local/sbin:/usr/local/bin"
MYPATH="$MYPATH:/bin:/sbin:/usr/bin:/usr/sbin"
fi
export PATH="$MYPATH"