From 0dae87d3c39796eb0e9288256737e45c5030650e Mon Sep 17 00:00:00 2001 From: Lucio Andrés Illanes Albornoz (arab, vxp) Date: Feb 07 2016 21:25:58 +0000 Subject: Clear all locale (7) environment variables before each build. --- diff --git a/build.sh b/build.sh index 21cf1f2..6808e44 100755 --- a/build.sh +++ b/build.sh @@ -5,6 +5,8 @@ unset AR ARFLAGS CC CFLAGS CXX CXXFLAGS LD LDFLAGS; . ./build.vars; . ./build.subr; check_path_vars PREFIX PREFIX_NATIVE WORKDIR; check_prereqs git make openssl sed sort tar tr wget; +set_env_vars "" LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS \ +LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL; log_msg info "Build started by ${BUILD_USER:=${USER}}@${BUILD_HNAME:=$(hostname)} at ${BUILD_DATE:=$(date %Y-%m-%d-%H-%M-%S)}."; #trap (set -o errexit; mkdir -p ${PREFIX} ${WORKDIR}); diff --git a/build.subr b/build.subr index e8d0a9f..1c1e798 100644 --- a/build.subr +++ b/build.subr @@ -146,7 +146,11 @@ set_build_dir() { set_env_vars() { _val=${1}; shift; while [ $# -ge 1 ]; do - export "${1}=${_val}"; shift; + if [ -z "${_val}" ]; then + unset ${1}; + else + export "${1}=${_val}"; + fi; shift; done; unset _val; };