diff --git a/xbps-src/shutils/init_funcs.sh.in b/xbps-src/shutils/init_funcs.sh.in index 796df450cef..ceee611b1a4 100644 --- a/xbps-src/shutils/init_funcs.sh.in +++ b/xbps-src/shutils/init_funcs.sh.in @@ -41,7 +41,11 @@ set_defvars() else : ${XBPS_DESTDIR:=$XBPS_MASTERDIR/destdir} fi - : ${XBPS_PACKAGESDIR:=$XBPS_MASTERDIR/host/binpkgs} + if [ -n "$XBPS_HOSTDIR" ]; then + : ${XBPS_PACKAGESDIR=$XBPS_HOSTDIR/binpkgs} + else + : ${XBPS_PACKAGESDIR:=$XBPS_MASTERDIR/host/binpkgs} + fi : ${XBPS_BUILDDIR:=$XBPS_MASTERDIR/builddir} : ${XBPS_SRCDISTDIR:=$XBPS_MASTERDIR/host/sources} : ${XBPS_TRIGGERSDIR:=$XBPS_SRCPKGDIR/xbps-triggers/files}