summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-02-29 01:11:24 +0000
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-02-29 01:11:24 +0000
commitdda17d403570f1e9dc96246ec8ab5b1a6ea09728 (patch)
treeb11fceb910ca8202ae3644bf664ed43df36e2700
parent67ca08edaccb5eff0bd9aabc4de3ad0d2af9b01e (diff)
downloadmidipix_build-dda17d403570f1e9dc96246ec8ab5b1a6ea09728.tar.bz2
midipix_build-dda17d403570f1e9dc96246ec8ab5b1a6ea09728.tar.xz
build.sh:buildp_dispatch(): silence command(1) output.
build.sh:build(): turn ${_build_date_start} into scoped global ${BUILD_DATE_START} due to vars/invariants_zipdist.vars. subr/ex_pkg_exec.subr:ex_pkg_exec(): correctly set ${_rc} from pkg_${_pkg_name}_all()'s return status. subr/ex_pkg_exec.subr:ex_pkg_exec(): only set `finish' package build state given zero ${_rc} and ${_restart_at}.
-rwxr-xr-xbuild.sh7
-rw-r--r--subr/ex_pkg_exec.subr7
2 files changed, 9 insertions, 5 deletions
diff --git a/build.sh b/build.sh
index b281c7e0..71565215 100755
--- a/build.sh
+++ b/build.sh
@@ -69,15 +69,16 @@ buildp_dispatch() {
buildp_dispatch_pkg_state "${_msg}" "${@}"; ;;
finish_group|start_group)
buildp_dispatch_group_state "${_msg}" "${@}"; ;;
- *) if command -v "buildp_dispatch_${_msg}"; then
+ *) if command -v "buildp_dispatch_${_msg}" >/dev/null 2>&1; then
"buildp_dispatch_${_msg}" "${@}";
fi; ;;
esac;
};
build() {
- local _build_date_start="" _build_time_hours=0 _build_time_mins=0 _build_time_secs=0 \
- BUILD_NFAIL=0 BUILD_NFINI=0 BUILD_NSKIP=0 BUILD_PKGS_FAILED="" EX_PKG_DISPATCH_UNKNOWN="";
+ local _build_time_hours=0 _build_time_mins=0 _build_time_secs=0 \
+ BUILD_DATE_START="" BUILD_NFAIL=0 BUILD_NFINI=0 BUILD_NSKIP=0 \
+ BUILD_PKGS_FAILED="" EX_PKG_DISPATCH_UNKNOWN="";
if trap "buildp_ast abort" HUP INT TERM USR1 USR2\
&& trap "buildp_ast exit" EXIT\
&& . ./subr/build_init.subr && build_init "${@}"; then
diff --git a/subr/ex_pkg_exec.subr b/subr/ex_pkg_exec.subr
index 0a40cfcf..6fb333bb 100644
--- a/subr/ex_pkg_exec.subr
+++ b/subr/ex_pkg_exec.subr
@@ -82,7 +82,7 @@ ex_pkg_exec() {
if exp_pkg_exec_pre "${_group_name}" "${_pkg_name}" "${_restart_at}"\
&& "${_dispatch_fn}" start_pkg_child "${_group_name}" "${_pkg_name}"; then
if rtl_test_cmd "pkg_${_pkg_name}_all"; then
- "pkg_${_pkg_name}_all" "${_restart_at}";
+ "pkg_${_pkg_name}_all" "${_restart_at}"; _rc="${?}";
else set -- ${PKG_BUILD_STEPS};
while [ ${#} -gt 0 ]; do
_step="${1}"; _step_next="${2}"; shift;
@@ -97,7 +97,10 @@ ex_pkg_exec() {
fi;
done;
fi;
- ex_pkg_state_set "${_pkg_name}" finish;
+ if [ "${_rc:-0}" -eq 0 ]\
+ && [ -z "${_restart_at}" ]; then
+ ex_pkg_state_set "${_pkg_name}" finish;
+ fi;
fi;
return "${_rc}";
};