diff --git a/build.sh b/build.sh index f3e5a2b..f34025e 100755 --- a/build.sh +++ b/build.sh @@ -91,8 +91,8 @@ buildp_dispatch() { }; build() { - 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 \ + local _build_time_hours=0 _build_time_mins=0 _build_time_secs=0 _pkg_name="" \ + 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\ @@ -104,7 +104,9 @@ build() { buildp_dispatch "${BUILD_GROUPS}" "${ARG_PARALLEL:-1}" \ "${BUILD_WORKDIR}/build.fifo" "${ARG_RESTART}" \ "${ARG_RESTART_AT}" "${ARG_RESTART_RECURSIVE}" "${BUILD_WORKDIR}"; then - rtl_log_msg failexit "Error: package \`${EX_PKG_DISPATCH_UNKNOWN}' unknown."; + for _pkg_name in ${EX_PKG_DISPATCH_UNKNOWN}; do + rtl_log_msg fail "Error: package \`${_pkg_name}' unknown."; + done; exit 1; else : $((_build_time_secs=$(rtl_date %s)-${_build_time_secs})); : $((_build_time_hours=${_build_time_secs}/3600)); : $((_build_time_minutes=(${_build_time_secs}%3600)/60)); diff --git a/subr/build_init.subr b/subr/build_init.subr index fb3e248..7cce5da 100644 --- a/subr/build_init.subr +++ b/subr/build_init.subr @@ -20,7 +20,7 @@ buildp_init_args() { ALL) ARG_RESTART_AT=ALL; ARG_RESTART_RECURSIVE=2; ;; LAST) ARG_RESTART_AT=ALL; ARG_RESTART_RECURSIVE=0; ;; "") ;; - *:*) ARG_RESTART_AT="${ARG_RESTART#*:}"; ARG_RESTART="${ARG_RESTART%:*}"; ;; + *:*) ARG_RESTART_AT="${ARG_RESTART#*:}"; ARG_RESTART="$(echo "${ARG_RESTART%%:*}" | sed "s/,/ /g")"; ;; *) ARG_RESTART="$(echo "${ARG_RESTART}" | sed "s/,/ /g")"; ARG_RESTART_AT=ALL; ;; esac; if [ "${ARG_RESTART}" = "LAST" ]; then diff --git a/subr/ex_pkg.subr b/subr/ex_pkg.subr index fd2df52..e4a6814 100644 --- a/subr/ex_pkg.subr +++ b/subr/ex_pkg.subr @@ -30,7 +30,7 @@ ex_pkg_check_depends() { # # ex_pkg_expand_packages() - expand build group name to list of packages ordered and filtered according to dependency and restart constraints # @_group_name: build group name -# @_restart: optional comma-separated list of package names to rebuild +# @_restart: optional whitespace-separated list of package names to rebuild # @_restart_recursive: optional flag specifiying either no dependency expansion (0,) dependency expansion (1,) dependency expansion and forcibly rebuild (2.) # # Return: zero (0) on success, non-zero (>0) on failure, ${EXP_PKG_COMPLETE}, ${EXP_PKG_DISABLED}, ${EXP_PKG_FINISHED}, and ${EXP_PKG_NAMES} set post-return. diff --git a/subr/ex_pkg_dispatch.subr b/subr/ex_pkg_dispatch.subr index 749fe7f..688cd0e 100644 --- a/subr/ex_pkg_dispatch.subr +++ b/subr/ex_pkg_dispatch.subr @@ -152,7 +152,7 @@ exp_pkg_dispatch_packages() { # @_group_names: build group name(s) # @_njobs_max: maximum count of simultaneous jobs # @_pipe_path: pathname to build FIFO -# @_restart: optional comma-separated list of package names to rebuild +# @_restart: optional whitespace-separated list of package names to rebuild # @_restart_at: optional comma-separated list of build steps at which to rebuild or ALL # @_restart_recursive: optional flag specifiying either no dependency expansion (0,) dependency expansion (1,) dependency expansion and forcibly rebuild (2.) # @_workdir: pathname to build-specific temporary directory @@ -166,7 +166,7 @@ ex_pkg_dispatch() { _pkg_name="" _pkg_names="" _rc=0 \ EXP_PKG_COMPLETE EXP_PKG_DISABLED EXP_PKG_FINISHED EXP_PKG_DISPATCH_COUNT \ EXP_PKG_DISPATCH_COUNT_MAX EXP_PKG_DISPATCH_NJOBS EXP_PKG_NAMES; - EX_PKG_DISPATCH_UNKNOWN=""; EX_PKG_DISPATCH_WAIT=""; + EX_PKG_DISPATCH_WAIT=""; for _group_name in $(rtl_uniq $(rtl_lunfold_depends '${_name}_GROUP_DEPENDS' ${_group_names})); do EXP_PKG_COMPLETE="" EXP_PKG_DISABLED="" EXP_PKG_FINISHED=""; EXP_PKG_DISPATCH_COUNT=0 EXP_PKG_DISPATCH_COUNT_MAX=0 EXP_PKG_DISPATCH_NJOBS=0; @@ -193,7 +193,7 @@ ex_pkg_dispatch() { done; if ! rtl_lmatch "${_restart}" "ALL LAST"; then for _pkg_name in ${_restart}; do - if ! rtl_lmatch "${_pkg_names}" "${_restart}"; then + if ! rtl_lmatch "${_pkg_names}" "${_pkg_name}"; then EX_PKG_DISPATCH_UNKNOWN="$(rtl_lconcat "${EX_PKG_DISPATCH_UNKNOWN}" "${_pkg_name}")"; fi; done;