From 1dd016f3150117f7d7406e20c5ebb48eb406c2da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Tue, 6 Apr 2021 16:13:44 +0100 Subject: subr/build_init.subr:buildp_init_args(): check both automatic as well as non-automatic build groups. subr/ex_pkg.subr(:ex_pkg_load_vars(): return both automatic as well as non-automatic build groups. --- subr/build_init.subr | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'subr/build_init.subr') diff --git a/subr/build_init.subr b/subr/build_init.subr index 9e765275..d3e4ce19 100644 --- a/subr/build_init.subr +++ b/subr/build_init.subr @@ -3,7 +3,9 @@ # buildp_init_args() { - local _group="" _last_pkg="" _pkg_names_unknown="" _rc=0; _status=""; + local _foundfl=0 _group="" _last_pkg="" _pkg_names_unknown="" _rc=0\ + EX_PKG_BUILD_GROUPS EX_PKG_BUILD_GROUPS_NOAUTO; _status=""; + if [ -z "${BUILD_HNAME:-}" ]\ && ! BUILD_HNAME="$(hostname)"; then _rc=1; _status="Error: failed to obtain hostname."; @@ -51,11 +53,18 @@ buildp_init_args() { fi; if [ -z "${BUILD_GROUPS}" ]; then BUILD_GROUPS="${EX_PKG_BUILD_GROUPS}"; - else for _group in ${BUILD_GROUPS}; do - if ! rtl_lmatch "${EX_PKG_BUILD_GROUPS}" "${_group}"; then - _rc=1; _status="Error: unknown build group \`${_group}'."; break; + else _foundfl=0; for _group in ${BUILD_GROUPS}; do + if rtl_lmatch "${EX_PKG_BUILD_GROUPS}" "${_group}"; then + _foundfl=1; break; fi; done; + if [ "${_foundfl}" -eq 0 ]; then + _foundfl=0; for _group in ${BUILD_GROUPS}; do + if rtl_lmatch "${EX_PKG_BUILD_GROUPS}" "${_group}"; then + _rc=1; _status="Error: unknown build group \`${_group}'."; break; + fi; + done; + fi; fi; if [ "${_rc:-0}" -eq 0 ]; then if [ -n "${ARG_DIST}" ]; then -- cgit v1.2.3