summaryrefslogtreecommitdiffhomepage
path: root/subr
diff options
context:
space:
mode:
Diffstat (limited to 'subr')
-rw-r--r--subr/ex_pkg_dispatch.subr12
1 files changed, 8 insertions, 4 deletions
diff --git a/subr/ex_pkg_dispatch.subr b/subr/ex_pkg_dispatch.subr
index 89396ec7..399b860f 100644
--- a/subr/ex_pkg_dispatch.subr
+++ b/subr/ex_pkg_dispatch.subr
@@ -21,9 +21,10 @@ exp_pkg_check_depends() {
};
exp_pkg_dispatch_group() {
- local _njob=0 _pkg_depends="" _pkg_name="";
+ local _njob=0 _pkg_depends="" _pkg_name="" _pkg_skipfl=0;
for _njob in $(seq 1 $((${_njobs_max}-${_njobs}))); do
for _pkg_name in ${_pkg_names}; do
+ _pkg_skipfl=0;
if [ -z "$(ex_rtl_lsearch "${_pkgs_complete}" "${_pkg_name}")" ]\
&& [ -z "$(ex_rtl_lsearch "${_pkgs_wait}" "${_pkg_name}")" ]\
&& _pkg_depends="$(exp_pkg_expand_packages $(ex_rtl_get_var_unsafe "PKG_$(ex_rtl_toupper "${_pkg_name}")_DEPENDS"))"\
@@ -33,6 +34,8 @@ exp_pkg_dispatch_group() {
"${_stderrout_path}" "${_pipe_path}"; then
_pkgs_found_new="${_pkgs_found_new:+${_pkgs_found_new} }${_pkg_name}";
break;
+ elif [ "${_pkg_skipfl:-0}" -eq 1 ]; then
+ continue;
fi;
done;
done;
@@ -40,19 +43,19 @@ exp_pkg_dispatch_group() {
exp_pkg_dispatch_package() {
local _dispatch_fn="${1}" _group_name="${2}" _pkg_name="${3}" _restart="${4}" _restart_at="${5}" \
- _stderrout_path="${6}" _pipe_path="${7}" _pkg_name_uc="";
+ _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}";
_pkg_names="$(ex_rtl_lfilter "${_pkg_names}" "${_pkg_name}")";
- : $((_pkgs_count+=1));
+ : $((_pkgs_count+=1)); _pkg_skipfl=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 "$(ex_rtl_lsearch "${_restart}" "${_pkg_name}")" ]\
&& [ "${ARG_RESTART_RECURSIVE:-0}" -ne 2 ]; then
_pkgs_complete="${_pkgs_complete:+${_pkgs_complete} }${_pkg_name}";
_pkg_names="$(ex_rtl_lfilter "${_pkg_names}" "${_pkg_name}")";
- : $((_pkgs_count+=1));
+ : $((_pkgs_count+=1)); _pkg_skipfl=1; _rc=1;
"${_dispatch_fn}" skipped_pkg "${_group_name}" "${_pkg_name}" "${_pkgs_count}" "${_pkgs_count_max}";
else
: $((_pkgs_count+=1)); _pkgs_wait="${_pkgs_wait:+${_pkgs_wait} }${_pkg_name}";
@@ -64,6 +67,7 @@ exp_pkg_dispatch_package() {
"${_dispatch_fn}";) 1>"${_stderrout_path}" 2>&1 3>"${_pipe_path}" &
: $((_njobs+=1));
fi;
+ return "${_rc}";
};
exp_pkg_expand_packages() {