From ee0f4ca33061659b7b091dd2339576bd7cef2a2a Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Mon, 23 Jul 2018 22:59:19 -0700 Subject: [PATCH] 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. --- scripts/lib/install | 2 ++ scripts/lib/upgrade-zulip-stage-2 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/scripts/lib/install b/scripts/lib/install index 2445c6ace1..63aa72383b 100755 --- a/scripts/lib/install +++ b/scripts/lib/install @@ -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 diff --git a/scripts/lib/upgrade-zulip-stage-2 b/scripts/lib/upgrade-zulip-stage-2 index 16a7d1bb6d..83376af83f 100755 --- a/scripts/lib/upgrade-zulip-stage-2 +++ b/scripts/lib/upgrade-zulip-stage-2 @@ -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