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

@ -266,7 +266,7 @@ install_bbootstrap() {
masterdir_zap() {
for f in bin boot builddir destdir dev etc home lib lib32 lib64 mnt \
opt proc root run sbin sys tmp usr var host media xbps \
xbps-packages void-packages .xbps_chroot_init; do
void-packages .xbps_chroot_init; do
if [ -d "$XBPS_MASTERDIR/$f" ]; then
echo "Removing directory $XBPS_MASTERDIR/$f ..."
rm -rf $XBPS_MASTERDIR/$f
@ -559,6 +559,7 @@ case "$XBPS_TARGET" in
if [ -n "$CHROOT_READY" -a -z "$IN_CHROOT" ]; then
chroot_handler $XBPS_TARGET $XBPS_TARGET_PKG || exit $?
else
[ -d $XBPS_STATEDIR ] && rm -rf $XBPS_STATEDIR
remove_pkg_wrksrc $wrksrc
if declare -f do_clean >/dev/null; then
run_func do_clean