summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2021-08-24 13:40:04 +0200
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2021-08-24 13:40:04 +0200
commit925e1490736b7508ddc856c779fcba31bbb932f0 (patch)
tree767fa77c86924e433f7a9897d79d61f98602736c
parent1793b7961a7e20a770d0212fb99e837d0ddb8477 (diff)
downloadmidipix_build-925e1490736b7508ddc856c779fcba31bbb932f0.tar.bz2
midipix_build-925e1490736b7508ddc856c779fcba31bbb932f0.tar.xz
subr/ex_pkg_env.subr:ex_pkg_env(): correctly source ${PKG_VARS_FILE}.
-rw-r--r--subr/ex_pkg_env.subr10
1 files changed, 8 insertions, 2 deletions
diff --git a/subr/ex_pkg_env.subr b/subr/ex_pkg_env.subr
index f3c3389e..f85c96e5 100644
--- a/subr/ex_pkg_env.subr
+++ b/subr/ex_pkg_env.subr
@@ -110,8 +110,14 @@ exp_pkg_env_set() {
#
ex_pkg_env() {
local _build_steps_default="${1}" _build_vars_default="${2}" _group_name="${3}" \
- _nounset="${4}" _pkg_name="${5}" _restart_at="${6}" _workdir="${7}" _vname="";
- rtl_fileop source_opt "${PKG_VARS_FILE:-vars/${_pkg_name}.vars}" "${_group_name}/${_pkg_name}.${_group_name}";
+ _nounset="${4}" _pkg_name="${5}" _restart_at="${6}" _workdir="${7}" \
+ _vars_file="" _vname="";
+
+ if ! _vars_file="$(rtl_get_var_unsafe -u "PKG_${_pkg_name}_VARS_FILE")"\
+ || [ "${#_vars_file}" -eq 0 ]; then
+ _vars_file="vars/${_pkg_name}.vars";
+ fi;
+ rtl_fileop source_opt "${_vars_file}" "${_group_name}/${_pkg_name}.${_group_name}";
if ! exp_pkg_env_set "${_build_vars_default}" "${_group_name}" "${_nounset}" "${_pkg_name}"\
|| ! exp_pkg_env_defaults "${_build_steps_default}" "${_pkg_name}" "${_workdir}"; then
return 1;