From 64c608a51a8bac68665ad266494ba6030fefc67d Mon Sep 17 00:00:00 2001 From: Greg Price Date: Wed, 22 Nov 2017 18:03:44 -0800 Subject: [PATCH] install: Clarify how we set locale during install, and why. This updates commit 11ab545f3 "install: Set the locale ..." to be somewhat cleaner, and to explain more in the commit message. In some environments, either pip itself fails or some packages fail to install, and setting the locale to en_US.UTF-8 resolves the issue. We heard reports of this kind of behavior with at least two different sets of symptoms, with 1.7.0 or its release candidates: https://chat.zulip.org/#narrow/stream/general/subject/Trusty.201.2E7.20Upgrade/near/302214 https://chat.zulip.org/#narrow/stream/production.20help/subject/1.2E6.20to.201.2E7/near/306250 In all reported cases, commit 11ab545f3 or equivalent fixed the issue. Setting LC_CTYPE is redundant when also setting LC_ALL, because LC_ALL overrides all `LC_*` environment variables; so skip that. Also move the line in `install` to a more appropriate spot, and adjust the comments. --- scripts/lib/install | 8 +++----- scripts/lib/upgrade-zulip-stage-2 | 7 +++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/scripts/lib/install b/scripts/lib/install index ec4a208bf9..7891c0bbd1 100755 --- a/scripts/lib/install +++ b/scripts/lib/install @@ -1,11 +1,6 @@ #!/usr/bin/env bash set -e -# Ensure that we're using a US locale, since some pip dependencies -# can't install in random locales. -export LC_ALL="en_US.UTF-8" -export LC_CTYPE="en_US.UTF-8" - usage() { cat <