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

View file

@ -37,7 +37,7 @@ do_make_build()
build_src_phase() build_src_phase()
{ {
local f local f rval
[ -z $pkgname -o -z $version ] && return 1 [ -z $pkgname -o -z $version ] && return 1
@ -65,7 +65,7 @@ build_src_phase()
# Run pre_build func. # Run pre_build func.
if [ ! -f $XBPS_PRE_BUILD_DONE ]; then if [ ! -f $XBPS_PRE_BUILD_DONE ]; then
run_func pre_build run_func pre_build
touch -f $XBPS_PRE_BUILD_DONE [ $? -eq 0 ] && touch -f $XBPS_PRE_BUILD_DONE
fi fi
if [ "$build_style" = "custom-install" ]; then if [ "$build_style" = "custom-install" ]; then
@ -73,16 +73,17 @@ build_src_phase()
else else
run_func do_make_build run_func do_make_build
fi fi
rval=$?
msg_normal "$pkgver: build phase done.\n"
# Run post_build func. # Run post_build func.
if [ ! -f $XBPS_POST_BUILD_DONE ]; then if [ ! -f $XBPS_POST_BUILD_DONE ]; then
run_func post_build run_func post_build
touch -f $XBPS_POST_BUILD_DONE [ $? -eq 0 ] && touch -f $XBPS_POST_BUILD_DONE
fi fi
unset makejobs 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() configure_src_phase()
{ {
local f local f rval
[ -z $pkgname ] && return 1 [ -z $pkgname ] && return 1
# #
@ -79,7 +79,7 @@ configure_src_phase()
# Run pre_configure func. # Run pre_configure func.
if [ ! -f $XBPS_PRECONFIGURE_DONE ]; then if [ ! -f $XBPS_PRECONFIGURE_DONE ]; then
run_func pre_configure run_func pre_configure
touch -f $XBPS_PRECONFIGURE_DONE [ $? -eq 0 ] && touch -f $XBPS_PRECONFIGURE_DONE
fi fi
[ -z "$configure_script" ] && configure_script="./configure" [ -z "$configure_script" ] && configure_script="./configure"
@ -103,14 +103,15 @@ configure_src_phase()
# #
msg_error "$pkgver: unknown build_style [$build_style]\n" msg_error "$pkgver: unknown build_style [$build_style]\n"
fi fi
rval=$?
msg_normal "$pkgver: configure phase done.\n"
# Run post_configure func. # Run post_configure func.
if [ ! -f $XBPS_POSTCONFIGURE_DONE ]; then if [ ! -f $XBPS_POSTCONFIGURE_DONE ]; then
run_func post_configure run_func post_configure
touch -f $XBPS_POSTCONFIGURE_DONE [ $? -eq 0 ] && touch -f $XBPS_POSTCONFIGURE_DONE
fi 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 unset INSTALLING_DEPS
setup_tmpl $curpkgn setup_tmpl $curpkgn
msg_normal "Installing '$pkgname'...\n" msg_normal "$pkgver: starting installation...\n"
fi fi
# Fetch distfiles after installing required dependencies, # Fetch distfiles after installing required dependencies,