xbps-src: multiple improvements for -B and run_func.
* run_func now errors out by itself if the function returned any error. * if -B flag is enabled and binpkg already exists, skip updating local repo pkg-index.
This commit is contained in:
parent
e22c565811
commit
110aede193
7 changed files with 74 additions and 78 deletions
|
@ -37,9 +37,9 @@ do_make_build()
|
|||
|
||||
build_src_phase()
|
||||
{
|
||||
local pkg="$pkgname-$version" pkgparam="$1" f lver
|
||||
local pkg="$pkgname-$version" f lver
|
||||
|
||||
[ -z $pkgparam ] && [ -z $pkgname -o -z $version ] && return 1
|
||||
[ -z $pkgname -o -z $version ] && return 1
|
||||
|
||||
#
|
||||
# Skip this phase for meta-template and only-install style builds.
|
||||
|
@ -72,10 +72,8 @@ build_src_phase()
|
|||
# Run pre_build func.
|
||||
if [ ! -f $XBPS_PRE_BUILD_DONE ]; then
|
||||
run_func pre_build
|
||||
if [ $? -eq 0 ]; then
|
||||
msg_normal "'$pkgname-$lver': pre_build phase done.\n"
|
||||
touch -f $XBPS_PRE_BUILD_DONE
|
||||
fi
|
||||
msg_normal "'$pkgname-$lver': pre_build phase done.\n"
|
||||
touch -f $XBPS_PRE_BUILD_DONE
|
||||
fi
|
||||
|
||||
if [ "$build_style" = "custom-install" ]; then
|
||||
|
@ -89,10 +87,8 @@ build_src_phase()
|
|||
# Run post_build func.
|
||||
if [ ! -f $XBPS_POST_BUILD_DONE ]; then
|
||||
run_func post_build
|
||||
if [ $? -eq 0 ]; then
|
||||
msg_normal "'$pkgname-l$ver': post_build phase done.\n"
|
||||
touch -f $XBPS_POST_BUILD_DONE
|
||||
fi
|
||||
msg_normal "'$pkgname-l$ver': post_build phase done.\n"
|
||||
touch -f $XBPS_POST_BUILD_DONE
|
||||
fi
|
||||
|
||||
unset makejobs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue