diff options
author | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2020-05-11 10:14:57 +0100 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2020-05-11 10:14:57 +0100 |
commit | cc9c32f6aea99e082b7c9a359a089a5a0ff185cc (patch) | |
tree | be82baf9d83ea60c2803becc3039df2516f29115 | |
parent | d5d313b26099250aa5d0eab5cf0ca7584f97f6de (diff) | |
download | midipix_build-cc9c32f6aea99e082b7c9a359a089a5a0ff185cc.tar.bz2 midipix_build-cc9c32f6aea99e082b7c9a359a089a5a0ff185cc.tar.xz |
subr/ex_pkg.subr:ex_pkg_check_depends(): check for and exit on first unknown dependent package.
subr/ex_pkg_dispatch.subr():exp_pkg_dispatch_packages(): don't pass ${EX_PKG_DISPATCH_WAIT} to ex_pkg_check_depends().
-rw-r--r-- | subr/ex_pkg.subr | 15 | ||||
-rw-r--r-- | subr/ex_pkg_dispatch.subr | 2 |
2 files changed, 8 insertions, 9 deletions
diff --git a/subr/ex_pkg.subr b/subr/ex_pkg.subr index a5dcd0b0..4b88622c 100644 --- a/subr/ex_pkg.subr +++ b/subr/ex_pkg.subr @@ -9,23 +9,22 @@ # @_pkg_finished: list of finished packages # @_pkg_name: single package name # @_pkg_names: list of package names -# @_pkg_wait: list of in-progress packages # # Return: zero (0) given no outstanding dependencies, non-zero (>0) otherwise # ex_pkg_check_depends() { - local _checkfl="${1}" _pkg_disabled="${2}" _pkg_finished="${3}" _pkg_name="${4}" _pkg_names="${5}" _pkg_wait="${6}"\ + local _checkfl="${1}" _pkg_disabled="${2}" _pkg_finished="${3}" _pkg_name="${4}" _pkg_names="${5}"\ _dependfl=0 _pkg_depends="" _pkg_name_depend=""; if [ "${_checkfl:-0}" -eq 1 ]\ && _pkg_depends="$(rtl_uniq $(rtl_lunfold_depends 'PKG_${_name}_DEPENDS' $(rtl_get_var_unsafe -u "PKG_"${_pkg_name}"_DEPENDS")))"; then for _pkg_name_depend in $(rtl_uniq ${_pkg_depends}); do - if ! rtl_lmatch "${_pkg_names}" "${_pkg_name_depend}"; then - rtl_log_msg fatalexit "Error: dependency \`%s' of \`%s' unknown." "${_pkg_name_depend}" "${_pkg_name}"; - elif ! rtl_lmatch "${_pkg_disabled}" "${_pkg_name_depend}"\ + if ! rtl_lmatch "${_pkg_disabled}" "${_pkg_name_depend}"\ && ! rtl_lmatch "${_pkg_finished}" "${_pkg_name_depend}"; then - _dependfl=1; break; - elif rtl_lmatch "${_pkg_wait}" "${_pkg_name_depend}"; then - _dependfl=1; break; + if ! rtl_lmatch "${_pkg_names}" "${_pkg_name_depend}"; then + rtl_log_msg fatalexit "Error: dependency \`%s' of \`%s' unknown." "${_pkg_name_depend}" "${_pkg_name}"; + else + _dependfl=1; break; + fi; fi; done; fi; diff --git a/subr/ex_pkg_dispatch.subr b/subr/ex_pkg_dispatch.subr index f3997004..4d4574d2 100644 --- a/subr/ex_pkg_dispatch.subr +++ b/subr/ex_pkg_dispatch.subr @@ -169,7 +169,7 @@ exp_pkg_dispatch_packages() { && ! rtl_lmatch "${_pkg_finished}" "${_pkg_name}"\ && ! rtl_lmatch "${EX_PKG_DISPATCH_WAIT}" "${_pkg_name}"\ && ex_pkg_check_depends "${_checkfl}" "${_pkg_disabled}" "${_pkg_finished}" \ - "${_pkg_name}" "${EX_PKG_NAMES}" "${EX_PKG_DISPATCH_WAIT}"; then + "${_pkg_name}" "${EX_PKG_NAMES}"; then exp_pkg_dispatch_package "${_build_steps_default}" \ "${_build_vars_default}" "${_dispatch_fn}" \ "${_group_name}" "${_pkg_name}" "${_restart_at}" \ |