locale: Set LANG/LANGUAGE to match LC_ALL.

Apparently, perl at least expects LANG, LANGUAGE, and LC_ALL to be
consistent, and thus apt spits out a bunch of warnings if these are
different.  So if we're forcing LC_ALL in these installer/upgrade
script blocks, we should force the rest too.

I believe this fixes the remaining locale part of #9946.
This commit is contained in:
Tim Abbott 2018-07-23 22:59:19 -07:00
parent 7daf7c1498
commit ee0f4ca330
2 changed files with 4 additions and 0 deletions

View File

@ -73,6 +73,8 @@ ZULIP_PATH="$(readlink -f $(dirname $0)/../..)"
# Force a known locale. Some packages on PyPI fail to install in some locales.
locale-gen en_US.UTF-8
export LC_ALL="en_US.UTF-8"
export LANG="en_US.UTF-8"
export LANGUAGE="en_US.UTF-8"
# Check for a supported OS release.
apt-get install -y lsb-release

View File

@ -14,6 +14,8 @@ os.environ["PYTHONUNBUFFERED"] = "y"
# Force a known locale. Some packages on PyPI fail to install in some locales.
os.environ["LC_ALL"] = "en_US.UTF-8"
os.environ["LANG"] = "en_US.UTF-8"
os.environ["LANGUAGE"] = "en_US.UTF-8"
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..'))
from scripts.lib.zulip_tools import DEPLOYMENTS_DIR, FAIL, WARNING, ENDC, su_to_zulip