From 8eb7cf914aa4a7b81499ed2d0b376e6dd8e655ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Sun, 20 Jan 2019 13:40:37 +0000 Subject: subr/ex_pkg_dispatch.subr:ex_pkg_dispatch(): amend vs. set ${${_pkgs_found_vname}}. --- subr/ex_pkg_dispatch.subr | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'subr') diff --git a/subr/ex_pkg_dispatch.subr b/subr/ex_pkg_dispatch.subr index 0b0fa7d8..4ab157ce 100644 --- a/subr/ex_pkg_dispatch.subr +++ b/subr/ex_pkg_dispatch.subr @@ -30,7 +30,7 @@ exp_pkg_dispatch() { ex_pkg_dispatch() { local _tgt_name="${1}" _restart="${2}" _restart_at="${3}" _dispatch_fn="${4}" _pkgs_found_vname="${5}" \ _njob="" _njobs="" _njobs_max="" _pipe_msg="" _pipe_path="" _pkg_names="" _pkgs_found="" \ - _script_rc="" _stderrout_path="" _tgt_name_uc=""; + _pkgs_found_new="" _script_rc="" _stderrout_path="" _tgt_name_uc=""; ex_rtl_fileop mkdir "${BUILD_WORKDIR}"; _pipe_path="${BUILD_WORKDIR}/build.fifo"; _tgt_name_uc="$(ex_rtl_toupper "${_tgt_name}")"; @@ -54,7 +54,7 @@ ex_pkg_dispatch() { if [ ${#} -eq 0 ]; then break; else - _pkgs_found="${_pkgs_found:+${_pkgs_found} }${1}"; + _pkgs_found_new="${_pkgs_found_new:+${_pkgs_found_new} }${1}"; exp_pkg_dispatch "${1}" "${_tgt_name}" \ "${_restart_at}" "${_dispatch_fn}" \ "${_stderrout_path}" "${_pipe_path}" \ @@ -94,7 +94,8 @@ ex_pkg_dispatch() { done; "${_dispatch_fn}" finish_target "" "${_tgt_name}"; if [ -n "${_pkgs_found_vname}" ]; then - ex_rtl_set_var_unsafe "${_pkgs_found_vname}" "${_pkgs_found}"; + _pkgs_found="$(ex_rtl_get_var_unsafe "${_pkgs_found_vname}")"; + ex_rtl_set_var_unsafe "${_pkgs_found_vname}" "${_pkgs_found:+${_pkgs_found} }${_pkgs_found_new}"; fi; }; -- cgit v1.2.3