xbps-src: introduce XBPS_STATEDIR to store state files, logs and others.

XBPS_STATEDIR is created in XBPS_BUILDDIR/.xbps-${sourcepkg}-${version}
and contains logs and state files for all phases, as well as wrappers.

We can now inspect the output from all hooks.
This commit is contained in:
Juan RP 2014-12-11 11:02:22 +01:00
parent 8ad235c69d
commit 6e13dcbaff
11 changed files with 33 additions and 33 deletions

View file

@ -24,9 +24,9 @@ for f in $XBPS_COMMONDIR/environment/install/*.sh; do
source_file "$f"
done
XBPS_INSTALL_DONE="$wrksrc/.xbps_${XBPS_CROSS_BUILD}_install_done"
XBPS_PRE_INSTALL_DONE="$wrksrc/.xbps_${XBPS_CROSS_BUILD}_pre_install_done"
XBPS_POST_INSTALL_DONE="$wrksrc/.xbps_${XBPS_CROSS_BUILD}_post_install_done"
XBPS_INSTALL_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_install_done"
XBPS_PRE_INSTALL_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_pre_install_done"
XBPS_POST_INSTALL_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_post_install_done"
cd $wrksrc || msg_error "$pkgver: cannot access to wrksrc [$wrksrc]\n"
if [ -n "$build_wrksrc" ]; then
@ -74,7 +74,7 @@ if [ ! -f $XBPS_INSTALL_DONE ]; then
exit 0
fi
XBPS_SUBPKG_INSTALL_DONE="$wrksrc/.xbps_${XBPS_CROSS_BUILD}_${PKGNAME}_install_done"
XBPS_SUBPKG_INSTALL_DONE="${XBPS_STATEDIR}/${PKGNAME}_${XBPS_CROSS_BUILD}_subpkg_install_done"
# If it's a subpkg execute the pkg_install() function.
if [ ! -f $XBPS_SUBPKG_INSTALL_DONE ]; then