From 1c6c043f9bf40ce026c03d8bdc1fe8f42c52d9c5 Mon Sep 17 00:00:00 2001 From: Lucio Andrés Illanes Albornoz Date: Feb 26 2020 22:03:41 +0000 Subject: build.sh:buildp_dispatch_group_state(): fix type signature. subr/build_init.subr:buildp_init_vars(): fix ${_default_build_groups} generation. --- diff --git a/build.sh b/build.sh index b88aab7..b281c7e 100755 --- a/build.sh +++ b/build.sh @@ -31,7 +31,7 @@ buildp_dispatch_fail_pkg() { }; buildp_dispatch_group_state() { - local _group_name="${1}"; + local _msg="${1}" _group_name="${2}"; case "${_msg}" in finish_group) rtl_log_msg suc2 "Finished \`${_group_name}' build group."; ;; start_group) rtl_log_msg inf2 "Starting \`${_group_name}' build group..."; ;; diff --git a/subr/build_init.subr b/subr/build_init.subr index a1c4f78..321678a 100644 --- a/subr/build_init.subr +++ b/subr/build_init.subr @@ -207,21 +207,21 @@ buildp_init_vars() { else for _fname in $(find ./groups -name *.group | sort); do rtl_fileop source_opt "${_fname}"; - if [ -n "${BUILD_TARGET}" ]; then - _target="${BUILD_TARGET}"; unset BUILD_TARGET; + if [ -n "${GROUP_TARGET}" ]; then + _target="${GROUP_TARGET}"; unset GROUP_TARGET; else _fname="${_fname##*/}"; _fname="${_fname%.group}"; _target="${_fname#*.}"; fi; _default_build_groups="$(rtl_lconcat "${_default_build_groups}" "${_target}")"; done; + _default_build_groups="$(rtl_uniq "${_default_build_groups}")"; if ! rtl_lmatch "${ARG_DIST}" "rpm" ","; then _default_build_groups="$(rtl_lfilter "${_default_build_groups}" "host_deps_rpm")"; fi; if [ -z "${BUILD_GROUPS}" ]; then BUILD_GROUPS="${_default_build_groups}"; fi; - BUILD_GROUPS="$(rtl_lfilter "${BUILD_GROUPS}" "invariants")"; - BUILD_GROUPS="$(rtl_lconcat "${BUILD_GROUPS}" "invariants")"; + BUILD_GROUPS="$(rtl_lconcat "$(rtl_lfilter "${BUILD_GROUPS}" "invariants")" "invariants")"; fi; fi; return "${_rc}";