summaryrefslogtreecommitdiffhomepage
path: root/subr.ex
diff options
context:
space:
mode:
authorLucía Andrea Illanes Albornoz <lucia@luciaillanes.de>2023-02-18 15:13:19 +0100
committerLucía Andrea Illanes Albornoz <lucia@luciaillanes.de>2023-02-18 15:13:19 +0100
commit703de4a1f2032064f1505eb50f1aac63f3c3cfab (patch)
treed4573607440f7fd7d75bf34ecc100d2f09bfeeec /subr.ex
parentf0f37f8e97f38dca476ba1f155a5139e6b90a58a (diff)
downloadmidipix_build-703de4a1f2032064f1505eb50f1aac63f3c3cfab.tar.bz2
midipix_build-703de4a1f2032064f1505eb50f1aac63f3c3cfab.tar.xz
subr.ex/ex_pkg_env.subr: correctly allow packages inheriting from other packages to override inherited variables.
Diffstat (limited to 'subr.ex')
-rw-r--r--subr.ex/ex_pkg_env.subr9
1 files changed, 7 insertions, 2 deletions
diff --git a/subr.ex/ex_pkg_env.subr b/subr.ex/ex_pkg_env.subr
index fcbe5c6d..fee09450 100644
--- a/subr.ex/ex_pkg_env.subr
+++ b/subr.ex/ex_pkg_env.subr
@@ -119,14 +119,19 @@ exp_pkg_env_set() {
ex_pkg_env() {
local _epe_build_steps_default="${1}" _epe_build_vars_default="${2}" _epe_group_name="${3}" \
_epe_pkg_name="${4}" _epe_restart_at="${5}" _epe_workdir="${6}" \
- _epe_inherit_from="" _epe_vars_file="" _epe_vname="";
+ _epe_inherit_from="" _epe_vars_file="" _epe_vars_file_parent="" _epe_vname="";
if rtl_get_var_unsafe \$_epe_inherit_from -u "PKG_${_epe_pkg_name}_INHERIT_FROM"\
&& [ "${_epe_inherit_from:+1}" = 1 ]; then
- rtl_get_var_unsafe \$_epe_vars_file -u "PKG_${_epe_inherit_from}_VARS_FILE";
+ rtl_get_var_unsafe \$_epe_vars_file_parent -u "PKG_${_epe_inherit_from}_VARS_FILE";
+ rtl_get_var_unsafe \$_epe_vars_file -u "PKG_${_epe_pkg_name}_VARS_FILE";
+ if [ "${_epe_vars_file:+1}" != 1 ]; then
+ _epe_vars_file="${_epe_vars_file_parent}";
+ fi;
else
rtl_get_var_unsafe \$_epe_vars_file -u "PKG_${_epe_pkg_name}_VARS_FILE";
fi;
+
if [ "${_epe_vars_file:+1}" != 1 ]; then
_epe_vars_file="vars/${_epe_pkg_name}.vars";
fi;