summaryrefslogtreecommitdiffhomepage
path: root/build.sh
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-02-25 22:31:28 +0000
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-02-25 22:31:28 +0000
commit4a5da5254e1207686f492e7ce8759c80466185f3 (patch)
tree4d8f42c4dfb10b68e75b0a26b581b41ea3218d2a /build.sh
parentd9df0cc4aa620e045a8df983ed959cbe25efe131 (diff)
downloadmidipix_build-4a5da5254e1207686f492e7ce8759c80466185f3.tar.bz2
midipix_build-4a5da5254e1207686f492e7ce8759c80466185f3.tar.xz
build.sh: reintroduce {disabled,skipped}_pkg messages at -v[v[v]].
build.sh, subr/build_init.subr: minor cleanup. subr/ex_pkg_dispatch.subr:exp_pkg_expand_packages(): call ${_dispatch_fn} w/ {disabled,skipped}_pkg for {disabled,skipped} packages. subr/ex_pkg_dispatch.subr:exp_pkg_expand_packages(): don't mutate ${EX_PKG_NSKIPPED}. subr/ex_pkg_dispatch.subr:ex_pkg_dispatch(): don't set ${EX_PKG_NSKIPPED}.
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh17
1 files changed, 9 insertions, 8 deletions
diff --git a/build.sh b/build.sh
index d9bfd93c..be59adbb 100755
--- a/build.sh
+++ b/build.sh
@@ -5,7 +5,7 @@
buildp_dispatch() {
local _msg="${1}" _group_name="${2}" _pkg_name="${3}" \
_build_group_lc="" _build_group_meta="" _build_groups_lc="" \
- _njobs_max=1 _pkg_names="" _pkg_restart="" _rc=0;
+ _pkg_names="" _pkg_restart="" _rc=0;
case "${_msg}" in
# Top-level
start_build) shift; build_init "${@}";
@@ -15,13 +15,10 @@ buildp_dispatch() {
if ! ex_rtl_lmatch "${ARG_DIST}" "rpm" ","; then
_build_groups_lc="$(ex_rtl_lfilter "${_build_groups_lc}" "host_deps_rpm")";
fi;
- if [ "${ARG_PARALLEL:-0}" -gt 1 ]; then
- _njobs_max="${ARG_PARALLEL}";
- fi;
for _build_group_lc in ${_build_groups_lc}; do
- ex_pkg_dispatch buildp_dispatch "${_build_group_lc}" "${_njobs_max}" \
+ ex_pkg_dispatch buildp_dispatch "${_build_group_lc}" "${ARG_PARALLEL:-1}" \
"${ARG_RESTART}" "${ARG_RESTART_AT}" "${ARG_RESTART_RECURSIVE}"; _rc="${?}";
- : $((_nskipped+=${EX_PKG_NSKIPPED})); _pkg_names="$(ex_rtl_lconcat "${_pkg_names}" "${EX_PKG_NAMES}")";
+ _pkg_names="$(ex_rtl_lconcat "${_pkg_names}" "${EX_PKG_NAMES}")";
if [ "${_rc}" -ne 0 ]; then
break;
fi;
@@ -32,12 +29,12 @@ buildp_dispatch() {
ex_rtl_log_msg failexit "Error: package \`${_pkg_restart}' unknown.";
fi;
done;
- if ! ex_pkg_dispatch buildp_dispatch "invariants" "${_njobs_max}" "ALL" "ALL" 2; then
+ if ! ex_pkg_dispatch buildp_dispatch "invariants" "${ARG_PARALLEL:-1}" "ALL" "ALL" 2; then
break;
fi;
buildp_dispatch finish_build; ;;
finish_build) build_fini;
- ex_rtl_log_msg info "${BUILD_NFINI:-0} finished, ${_nskipped:-0} skipped, and ${BUILD_NFAIL:-0} failed builds in ${BUILD_NBUILT:-0} build script(s).";
+ ex_rtl_log_msg info "${BUILD_NFINI:-0} finished, ${BUILD_NSKIP:-0} skipped, and ${BUILD_NFAIL:-0} failed package(s).";
ex_rtl_log_msg info "Build time: ${BUILD_TIMES_HOURS:-0} hour(s), ${BUILD_TIMES_MINUTES:-0} minute(s), and ${BUILD_TIMES_SECS:-0} second(s).";
if [ -n "${BUILD_PKGS_FAILED}" ]; then
ex_rtl_log_msg failexit "Build script failure(s) in: ${BUILD_PKGS_FAILED}.";
@@ -71,6 +68,10 @@ buildp_dispatch() {
fi;
exit 1;
fi; ;;
+ disabled_pkg) : $((BUILD_NSKIP+=1));
+ ex_rtl_log_msg vnfo "$(printf "Skipping disabled package \`%s.'" "${_pkg_name}")"; ;;
+ skipped_pkg) : $((BUILD_NSKIP+=1));
+ ex_rtl_log_msg vnfo "$(printf "Skipping finished package \`%s.'" "${_pkg_name}")"; ;;
step_pkg) ex_rtl_log_msg vucc "$(printf "Finished build step %s of package \`%s'." "${4}" "${_pkg_name}")"; ;;
# Child process