xbps-src: added suport for XBPS_CACHEDIR in configuration file.
XBPS_CACHEDIR will be bind mounted as read/write in target masterdir into /cachedir. This directory must have read/write perms for the user running xbps-src.
This commit is contained in:
parent
2bbfbc658f
commit
8b40d5cd68
4 changed files with 25 additions and 6 deletions
|
@ -31,14 +31,16 @@ trap "_umount && return $?" 0 INT QUIT TERM
|
|||
|
||||
_mount()
|
||||
{
|
||||
MASTERDIR="${XBPS_MASTERDIR}" ${sudo_cmd} \
|
||||
MASTERDIR="${XBPS_MASTERDIR}" CACHEDIR="${XBPS_CACHEDIR}" \
|
||||
${sudo_cmd} \
|
||||
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper mount
|
||||
return $?
|
||||
}
|
||||
|
||||
_umount()
|
||||
{
|
||||
MASTERDIR="${XBPS_MASTERDIR}" ${sudo_cmd} \
|
||||
MASTERDIR="${XBPS_MASTERDIR}" CACHEDIR="${XBPS_CACHEDIR}" \
|
||||
${sudo_cmd} \
|
||||
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper umount
|
||||
return $?
|
||||
}
|
||||
|
|
|
@ -65,6 +65,9 @@ set_defvars()
|
|||
if [ -n "$xver" ]; then
|
||||
# XBPS utils >= 0.9.0.
|
||||
xbps_conf="-C $XBPS_MASTERDIR/usr/local/etc/xbps-conf.plist"
|
||||
if [ -n "$XBPS_CACHEDIR" ]; then
|
||||
xbps_conf="$xbps_conf -c $XBPS_CACHEDIR"
|
||||
fi
|
||||
fi
|
||||
export XBPS_PKGDB_CMD="xbps-uhelper.static -r $XBPS_MASTERDIR"
|
||||
export XBPS_BIN_CMD="xbps-bin.static $xbps_conf -r $XBPS_MASTERDIR"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue