Improve how build deps are processed, return on errors immediately.
This commit is contained in:
parent
15b6f5be38
commit
e675201990
3 changed files with 83 additions and 27 deletions
|
@ -65,6 +65,10 @@ install_pkg()
|
|||
#
|
||||
if [ -z "$doing_deps" ]; then
|
||||
install_dependencies_pkg $pkg
|
||||
if [ $? -eq 1 ]; then
|
||||
msg_red "cannot install pkgdeps for '$pkg'!"
|
||||
return 1
|
||||
fi
|
||||
#
|
||||
# At this point all required deps are installed, and
|
||||
# only remaining is the origin package; install it.
|
||||
|
@ -81,17 +85,29 @@ install_pkg()
|
|||
|
||||
if [ ! -f "$XBPS_EXTRACT_DONE" ]; then
|
||||
. $XBPS_SHUTILSDIR/extract_funcs.sh
|
||||
extract_distfiles || return $?
|
||||
extract_distfiles
|
||||
if [ $? -ne 0 ]; then
|
||||
msg_red "cannot extract distfiles for '$pkgname'!"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -f "$XBPS_CONFIGURE_DONE" ]; then
|
||||
. $XBPS_SHUTILSDIR/configure_funcs.sh
|
||||
configure_src_phase || return $?
|
||||
configure_src_phase
|
||||
if [ $? -ne 0 ]; then
|
||||
msg_red "cannot configure '$pkgname'!"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -f "$XBPS_BUILD_DONE" ]; then
|
||||
. $XBPS_SHUTILSDIR/build_funcs.sh
|
||||
build_src_phase || return $?
|
||||
build_src_phase
|
||||
if [ $? -ne 0 ]; then
|
||||
msg_red "cannot build '$pkgname'!"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Install pkg into destdir.
|
||||
|
@ -100,18 +116,30 @@ install_pkg()
|
|||
dontrm_builddir=${dontrm_builddir} wrksrc=${wrksrc} \
|
||||
${fakeroot_cmd} ${fakeroot_cmd_args} \
|
||||
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-doinst-helper \
|
||||
${curpkgn} || return $?
|
||||
${curpkgn}
|
||||
if [ $? -ne 0 ]; then
|
||||
msg_red "xbps-src-doinst-helper failed for '$pkgname'!"
|
||||
return 1
|
||||
fi
|
||||
unset_build_vars
|
||||
|
||||
# Always write metadata to package's destdir.
|
||||
. $XBPS_SHUTILSDIR/metadata.sh
|
||||
xbps_write_metadata_pkg || return $?
|
||||
xbps_write_metadata_pkg
|
||||
if [ $? -ne 0 ]; then
|
||||
msg_red "cannot write package metadata for '$pkgname'!"
|
||||
return 1
|
||||
fi
|
||||
|
||||
[ "$install_destdir_target" = "yes" ] && return 0
|
||||
|
||||
# Stow package into masterdir.
|
||||
. $XBPS_SHUTILSDIR/stow_funcs.sh
|
||||
stow_pkg_handler stow || return $?
|
||||
stow_pkg_handler stow
|
||||
if [ $? -ne 0 ]; then
|
||||
msg_red "cannot stow '$pkgname'!"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue