summaryrefslogtreecommitdiffhomepage
path: root/subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-03-26 12:51:13 +0000
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-03-26 12:51:13 +0000
commitada80928ca048f64da89d21c9d8f53b1c48ec7e5 (patch)
tree5e140049288f526c46227691fe2571acf2c4e42a /subr
parent05a64f6fd94eae5054cf9f5ee550988532fccf74 (diff)
downloadmidipix_build-ada80928ca048f64da89d21c9d8f53b1c48ec7e5.tar.bz2
midipix_build-ada80928ca048f64da89d21c9d8f53b1c48ec7e5.tar.xz
subr/ex_pkg_env.subr:exp_pkg_env_set(): correctly join NL-separated package variable names before passing to rtl_set_vars().
Diffstat (limited to 'subr')
-rw-r--r--subr/ex_pkg_env.subr14
1 files changed, 7 insertions, 7 deletions
diff --git a/subr/ex_pkg_env.subr b/subr/ex_pkg_env.subr
index 8cd58f74..3526f378 100644
--- a/subr/ex_pkg_env.subr
+++ b/subr/ex_pkg_env.subr
@@ -57,19 +57,19 @@ exp_pkg_env_defaults() {
# Return: zero (0) on success, non-zero (>0) on failure
#
exp_pkg_env_set() {
- local _build_vars_default="${1}" _group_name="${2}" _nounset="${3}" \
+ local _build_vars_default="${1}" _group_name="${2}" _nounset="${3}"\
_pkg_name="${4}" _var_prefixes="" _vars_set="" _vname="" IFS IFS0;
rtl_set_vars _vars_set BUILD_TYPE "DEFAULT ${_group_name} PKG_${_pkg_name}";
rtl_set_vars _vars_set INHERIT_FROM "PKG_${_pkg_name}";
_var_prefixes="$(rtl_toupper "DEFAULT DEFAULT_${PKG_BUILD_TYPE} ${_group_name}")";
for _vname in $(rtl_lfilter "${_build_vars_default}" BUILD_TYPE); do
if [ -n "${PKG_INHERIT_FROM:-}" ]; then
- rtl_set_vars _vars_set "${_vname}" \
- "$(rtl_lconcat "${_var_prefixes}" \
+ rtl_set_vars _vars_set "${_vname}" \
+ "$(rtl_lconcat "${_var_prefixes}" \
"$(rtl_toupper "PKG_${PKG_INHERIT_FROM} PKG_${_pkg_name}")")"
else
- rtl_set_vars _vars_set "${_vname}" \
- "$(rtl_lconcat "${_var_prefixes}" \
+ rtl_set_vars _vars_set "${_vname}" \
+ "$(rtl_lconcat "${_var_prefixes}" \
"$(rtl_toupper "PKG_${_pkg_name}")")";
fi;
done;
@@ -77,8 +77,8 @@ exp_pkg_env_set() {
export "${_vname}";
done; IFS="${IFS0}";
if [ "${_nounset:-0}" -eq 0 ]; then
- rtl_unset_vars $(rtl_lfilter \
- "$(set | sed -ne '/^PKG_[^=]*=/s/=.*$//p')" \
+ rtl_unset_vars $(rtl_lfilter \
+ "$(set | sed -ne '/^PKG_[^=]*=/s/=.*$//p' | paste -s -d " ")" \
"${_vars_set}");
fi;
};