summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2017-03-10 14:59:46 +0100
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2017-03-10 14:59:46 +0100
commit70b9d46310e1334c29089c77d59a3f9b543396c9 (patch)
tree5f13d1a0c58fa2b6fa94038d57bbb00c68a4ac91
parent4677bc9f58fc4baf0beb973e75021c35b4877654 (diff)
downloadmidipix_build-70b9d46310e1334c29089c77d59a3f9b543396c9.tar.bz2
midipix_build-70b9d46310e1334c29089c77d59a3f9b543396c9.tar.xz
subr/pkg_setup_env.subr: log all environment variables set for a given package.
-rw-r--r--subr/pkg_setup_env.subr28
1 files changed, 13 insertions, 15 deletions
diff --git a/subr/pkg_setup_env.subr b/subr/pkg_setup_env.subr
index 0f16815c..6c9deb86 100644
--- a/subr/pkg_setup_env.subr
+++ b/subr/pkg_setup_env.subr
@@ -17,7 +17,12 @@ pkg_setup_env() {
"${BUILD_TARGET}_${_vname}" \
"PKG_${_pkg_name_parent_uc}_${_vname}" \
"PKG_${_pkg_name_parent_uc}_${_vname}_${_build_uc}"; do
- set_var_unsafe "PKG_${_vname}" "$(get_var_unsafe ${__})";
+ if [ -n "$(get_var_unsafe "${__}")" ]; then
+ set_var_unsafe "PKG_${_vname}" "$(get_var_unsafe ${__})";
+ if ! lmatch "${_log_env_vars}" " " "${__}"; then
+ _log_env_vars="${_log_env_vars:+${_log_env_vars} }${__}";
+ fi;
+ fi;
done;
done;
fi;
@@ -26,7 +31,12 @@ pkg_setup_env() {
"${BUILD_TARGET}_${_vname}" \
"PKG_${_pkg_name_uc}_${_vname}" \
"PKG_${_pkg_name_uc}_${_vname}_${_build_uc}"; do
- set_var_unsafe "PKG_${_vname}" "$(get_var_unsafe ${__})";
+ if [ -n "$(get_var_unsafe "${__}")" ]; then
+ set_var_unsafe "PKG_${_vname}" "$(get_var_unsafe ${__})";
+ if ! lmatch "${_log_env_vars}" " " "${__}"; then
+ _log_env_vars="${_log_env_vars:+${_log_env_vars} }${__}";
+ fi;
+ fi;
done;
done;
if [ -z "${PKG_URL}" -a -z "${PKG_URLS_GIT}" -a -z "${PKG_VERSION}" ]; then
@@ -56,20 +66,8 @@ pkg_setup_env() {
export MAKE="make LIBTOOL=${PKG_SLIBTOOL:-slibtool}";
fi;
fi;
- for __ in $(set); do
- if [ -n "${_pkg_name_parent_uc}" ]; then
- if [ "${__#PKG_${_pkg_name_uc}}" != "${__}" ]\
- || [ "${__#PKG_${_pkg_name_parent_uc}}" != "${__}" ]; then
- _log_env_vars="${_log_env_vars:+${_log_env_vars} }${__%%=*}";
- fi;
- else
- if [ "${__#PKG_${_pkg_name_uc}}" != "${__}" ]\
- && [ "${__#*_FLAVOUR_*}" = "${__}" ]; then
- _log_env_vars="${_log_env_vars:+${_log_env_vars} }${__%%=*}";
- fi;
- fi;
- done;
if [ -n "${_log_env_vars}" ]; then
+ _log_env_vars="$(echo "${_log_env_vars}" | tr " " "\n" | sort | tr "\n" " ")";
log_env_vars "build" ${_log_env_vars};
fi;
};