xbps-src: only touch status phase files on success, misc changes.

This commit is contained in:
Juan RP 2011-07-22 10:13:23 +02:00
parent 8beee2c33e
commit f3e5df1558
4 changed files with 19 additions and 16 deletions

View file

@ -63,7 +63,7 @@ install_src_phase()
# Run pre_install func.
if [ ! -f $XBPS_PRE_INSTALL_DONE ]; then
run_func pre_install
touch -f $XBPS_PRE_INSTALL_DONE
[ $? -eq 0 ] && touch -f $XBPS_PRE_INSTALL_DONE
fi
# Type of installation: custom, make or python.
@ -83,7 +83,7 @@ install_src_phase()
# Run post_install func.
if [ ! -f $XBPS_POST_INSTALL_DONE ]; then
run_func post_install
touch -f $XBPS_POST_INSTALL_DONE
[ $? -eq 0 ] && touch -f $XBPS_POST_INSTALL_DONE
fi
# Remove libtool archives by default.
@ -129,7 +129,8 @@ install_src_phase()
set_tmpl_common_vars
if [ ! -f ${wrksrc}/.xbps_do_install_${pkgname}_done ]; then
run_func do_install
touch -f ${wrksrc}/.xbps_do_install_${pkgname}_done
[ $? -eq 0 ] && \
touch -f ${wrksrc}/.xbps_do_install_${pkgname}_done
else
msg_warn "$pkgver: skipping '$pkgname' subpkg, already installed into destdir.\n"
fi

View file

@ -37,7 +37,7 @@ do_make_build()
build_src_phase()
{
local f
local f rval
[ -z $pkgname -o -z $version ] && return 1
@ -65,7 +65,7 @@ build_src_phase()
# Run pre_build func.
if [ ! -f $XBPS_PRE_BUILD_DONE ]; then
run_func pre_build
touch -f $XBPS_PRE_BUILD_DONE
[ $? -eq 0 ] && touch -f $XBPS_PRE_BUILD_DONE
fi
if [ "$build_style" = "custom-install" ]; then
@ -73,16 +73,17 @@ build_src_phase()
else
run_func do_make_build
fi
msg_normal "$pkgver: build phase done.\n"
rval=$?
# Run post_build func.
if [ ! -f $XBPS_POST_BUILD_DONE ]; then
run_func post_build
touch -f $XBPS_POST_BUILD_DONE
[ $? -eq 0 ] && touch -f $XBPS_POST_BUILD_DONE
fi
unset makejobs
touch -f $XBPS_BUILD_DONE
[ "$rval" -eq 0 ] && touch -f $XBPS_BUILD_DONE
return 0
}

View file

@ -62,7 +62,7 @@ do_perl_configure()
configure_src_phase()
{
local f
local f rval
[ -z $pkgname ] && return 1
#
@ -79,7 +79,7 @@ configure_src_phase()
# Run pre_configure func.
if [ ! -f $XBPS_PRECONFIGURE_DONE ]; then
run_func pre_configure
touch -f $XBPS_PRECONFIGURE_DONE
[ $? -eq 0 ] && touch -f $XBPS_PRECONFIGURE_DONE
fi
[ -z "$configure_script" ] && configure_script="./configure"
@ -103,14 +103,15 @@ configure_src_phase()
#
msg_error "$pkgver: unknown build_style [$build_style]\n"
fi
msg_normal "$pkgver: configure phase done.\n"
rval=$?
# Run post_configure func.
if [ ! -f $XBPS_POSTCONFIGURE_DONE ]; then
run_func post_configure
touch -f $XBPS_POSTCONFIGURE_DONE
[ $? -eq 0 ] && touch -f $XBPS_POSTCONFIGURE_DONE
fi
touch -f $XBPS_CONFIGURE_DONE
[ "$rval" -eq 0 ] && touch -f $XBPS_CONFIGURE_DONE
return 0
}

View file

@ -62,7 +62,7 @@ install_pkg()
#
unset INSTALLING_DEPS
setup_tmpl $curpkgn
msg_normal "Installing '$pkgname'...\n"
msg_normal "$pkgver: starting installation...\n"
fi
# Fetch distfiles after installing required dependencies,