From 6943a142ead7d48e072ab1fb392102beda267e66 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 19 Jan 2016 11:44:21 -0800 Subject: [PATCH] Fix postgres errors in Travis CI again. Travis CI's model of installing every version of postgres on the test VM and then shutting all the versions other than the one requested down seems to not work very well with doing apt upgrades. It seems the best way to resolve this is to just uninstall the versions we don't need. --- tools/travis/production-helper | 7 +------ tools/travis/setup-production | 5 +++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/travis/production-helper b/tools/travis/production-helper index c691531f70..4e3986c4f4 100755 --- a/tools/travis/production-helper +++ b/tools/travis/production-helper @@ -9,14 +9,9 @@ ln -s /etc/ssl/private/ssl-cert-snakeoil.key /etc/ssl/private/zulip.key tar -xf zulip-server-travis.tar.gz mv zulip-server-travis /root/zulip +# Do an apt upgrade to start with an up-to-date machine export APT_OPTIONS="-o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold" - -# Make sure we've done an apt upgrade and then stop postgres to -# workaround problems with Travis CI having multiple postgres versions -# installed on the system and 9.1 starting up and conflicting with -# running 9.3 later. apt-get upgrade -y $APT_OPTIONS -service postgresql stop # Install Zulip /root/zulip/scripts/setup/install diff --git a/tools/travis/setup-production b/tools/travis/setup-production index e63f499c50..29e5aaf703 100755 --- a/tools/travis/setup-production +++ b/tools/travis/setup-production @@ -2,6 +2,11 @@ set -e set -x +# Uninstall the unnecessary extra versions of postgres that Travis CI +# installs since if we don't do this, doing apt upgrades can fail due +# to conflicts over which version of postgres should be running. +sudo apt-get remove postgresql-9.1 postgresql-9.2 postgresql-9.4 -y + pip install pbs python provision.py --travis source /srv/zulip-venv/bin/activate