summaryrefslogtreecommitdiffhomepage
path: root/subr
diff options
context:
space:
mode:
Diffstat (limited to 'subr')
-rw-r--r--subr/ex_pkg.subr7
-rw-r--r--subr/ex_pkg_dispatch.subr8
2 files changed, 9 insertions, 6 deletions
diff --git a/subr/ex_pkg.subr b/subr/ex_pkg.subr
index 8df0e17f..a5dcd0b0 100644
--- a/subr/ex_pkg.subr
+++ b/subr/ex_pkg.subr
@@ -8,17 +8,20 @@
# @_pkg_disabled: list of disabled packages
# @_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_wait="${5}"\
+ local _checkfl="${1}" _pkg_disabled="${2}" _pkg_finished="${3}" _pkg_name="${4}" _pkg_names="${5}" _pkg_wait="${6}"\
_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_disabled}" "${_pkg_name_depend}"\
+ 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}"\
&& ! rtl_lmatch "${_pkg_finished}" "${_pkg_name_depend}"; then
_dependfl=1; break;
elif rtl_lmatch "${_pkg_wait}" "${_pkg_name_depend}"; then
diff --git a/subr/ex_pkg_dispatch.subr b/subr/ex_pkg_dispatch.subr
index 669357cd..f3997004 100644
--- a/subr/ex_pkg_dispatch.subr
+++ b/subr/ex_pkg_dispatch.subr
@@ -158,9 +158,9 @@ exp_pkg_dispatch_package() {
# Return: zero (0) on success, non-zero (>0) on failure, ${EXP_PKG_DISPATCH_NJOBS}, ${EXP_PKG_DISPATCH_COUNT}, ${EX_PKG_NAMES}, and ${EX_PKG_DISPATCH_WAIT} may be mutated post-return.
#
exp_pkg_dispatch_packages() {
- local _build_steps_default="${1}" _build_vars_default="${2}" _checkfl="${3}" \
- _dispatch_fn="${4}" _group_name="${5}" _njobs_max="${6}" _pipe_path="${7}" \
- _pkg_disabled="${8}" _pkg_finished="${9}" _restart_at="${10}" _workdir="${11}" \
+ local _build_steps_default="${1}" _build_vars_default="${2}" _checkfl="${3}"\
+ _dispatch_fn="${4}" _group_name="${5}" _njobs_max="${6}" _pipe_path="${7}"\
+ _pkg_disabled="${8}" _pkg_finished="${9}" _restart_at="${10}" _workdir="${11}"\
_foundfl=0 _njob=0 _pkg_depends="" _pkg_name="";
while [ "${EXP_PKG_DISPATCH_NJOBS:-0}" -lt "${_njobs_max}" ]; do
_foundfl=0;
@@ -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_DISPATCH_WAIT}"; then
+ "${_pkg_name}" "${EX_PKG_NAMES}" "${EX_PKG_DISPATCH_WAIT}"; then
exp_pkg_dispatch_package "${_build_steps_default}" \
"${_build_vars_default}" "${_dispatch_fn}" \
"${_group_name}" "${_pkg_name}" "${_restart_at}" \