From ebda8bb2b1103bfe79ba7196832f4c0b2b5caffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Fri, 14 Feb 2020 13:00:38 +0000 Subject: build.sh: minor cleanup. groups/2*.native_packages_*.group: adds dependencies. subr/{build_init,ex_pkg_dispatch}.subr, etc/build.usage: forcibly rebuild all dependencies w/ -r **[ ...] vs. -r *[ ... ]. subr/ex_pkg_dispatch.subr:exp_pkg_get_packages(): log message before and after resolving dependencies. --- subr/ex_pkg_dispatch.subr | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'subr/ex_pkg_dispatch.subr') diff --git a/subr/ex_pkg_dispatch.subr b/subr/ex_pkg_dispatch.subr index 7ea95875..13b2a6d8 100644 --- a/subr/ex_pkg_dispatch.subr +++ b/subr/ex_pkg_dispatch.subr @@ -29,8 +29,8 @@ exp_pkg_dispatch_group() { && _pkg_depends="$(exp_pkg_expand_packages $(ex_rtl_get_var_unsafe "PKG_$(ex_rtl_toupper "${_pkg_name}")_DEPENDS"))"\ && exp_pkg_check_depends "${_group_name}" "${_pkg_depends}" "${_pkg_name}" \ && exp_pkg_dispatch_package "${_dispatch_fn}" "${_group_name}" \ - "${_pkg_name}" "${_restart_at}" "${_stderrout_path}" \ - "${_pipe_path}"; then + "${_pkg_name}" "${_restart}" "${_restart_at}" \ + "${_stderrout_path}" "${_pipe_path}"; then _pkgs_found_new="${_pkgs_found_new:+${_pkgs_found_new} }${_pkg_name}"; break; fi; @@ -39,8 +39,8 @@ exp_pkg_dispatch_group() { }; exp_pkg_dispatch_package() { - local _dispatch_fn="${1}" _group_name="${2}" _pkg_name="${3}" _restart_at="${4}" \ - _stderrout_path="${5}" _pipe_path="${6}" _pkg_name_uc="" _rc=0; + local _dispatch_fn="${1}" _group_name="${2}" _pkg_name="${3}" _restart="${4}" _restart_at="${5}" \ + _stderrout_path="${6}" _pipe_path="${7}" _pkg_name_uc="" _rc=0; _pkg_name_uc="$(ex_rtl_toupper "${_pkg_name}")"; if [ -n "$(ex_rtl_get_var_unsafe PKG_${_pkg_name_uc}_DISABLED)" ]; then _pkgs_complete="${_pkgs_complete:+${_pkgs_complete} }${_pkg_name}"; @@ -48,7 +48,8 @@ exp_pkg_dispatch_package() { : $((_pkgs_count+=1)); _rc=1; "${_dispatch_fn}" disabled_pkg "${_group_name}" "${_pkg_name}" "${_pkgs_count}" "${_pkgs_count_max}"; elif ex_pkg_state_test "${_pkg_name}" finish\ - && [ -z "${_restart_at}" ]; then + && [ -z "$(ex_rtl_lsearch "${_restart}" "${_pkg_name}")" ]\ + && [ "${ARG_RESTART_RECURSIVE}" -ne 2 ]; then _pkgs_complete="${_pkgs_complete:+${_pkgs_complete} }${_pkg_name}"; _pkg_names="$(ex_rtl_lfilter "${_pkg_names}" "${_pkg_name}")"; : $((_pkgs_count+=1)); _rc=1; @@ -59,7 +60,7 @@ exp_pkg_dispatch_package() { "${_dispatch_fn}" start_pkg "${_group_name}" "${_pkg_name}" "${_pkgs_count}" "${_pkgs_count_max}"; (set -o errexit -o noglob; BUILD_IS_PARENT=0; ex_pkg_env "${_group_name}" "${_pkg_name}" "${_restart_at}"; - ex_pkg_exec "${_group_name}" "${_pkg_name}" "${_restart_at}" \ + ex_pkg_exec "${_group_name}" "${_pkg_name}" "${_restart_at}" \ "${_dispatch_fn}";) 1>"${_stderrout_path}" 2>&1 3>"${_pipe_path}" & : $((_njobs+=1)); fi; @@ -89,8 +90,10 @@ exp_pkg_get_packages() { _pkg_names="$(ex_rtl_lsearch "${_pkg_names}" "${_restart}")"; fi; if ! [ -n "${_restart}" ]\ - || [ "${ARG_RESTART_RECURSIVE:-0}" -eq 1 ]; then + || [ "${ARG_RESTART_RECURSIVE:-0}" -ge 1 ]; then + ex_rtl_log_msg vnfo "Resolving \`${_group_name}' dependencies..."; _pkg_names="$(ex_rtl_uniq $(exp_pkg_expand_packages ${_pkg_names}))"; + ex_rtl_log_msg vnfo "Resolved \`${_group_name}' dependencies."; fi; }; -- cgit v1.2.3