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.
This commit is contained in:
Tim Abbott 2016-01-19 11:44:21 -08:00
parent e1e7ea01ca
commit 6943a142ea
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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