travis: Remove unnecessary third party apt repositories
i.e. remove all, but ubuntu-toolchain-r-test repository.
This problem with installing packages: there was error caused by java
packages (oracle-java8-installer, oracle-java9-installer). We don't want
build failures and false positive reports due packages we don't need.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
diff --git a/.travis.yml b/.travis.yml
index f3ae727..8117665 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -93,10 +93,14 @@
secure: "b/xcA/K5OyQvPPnd0PRahTH5LJu8lgz8goGHvhXpHo+ZPsPgTDXNFo5cX9fSOkMuFKeoW8iGl0wOgK2+ptc8mbYDw277K4RFIHRHeV/KIoE1EzjQnEFiL8J0oHCAvDj12o0AXeriTyY9gICXKbR31Br6Zh5eKViDJe2OAGeHeDU="
before_install:
- # travis-ci/travis-ci#9112: disabling repositories causing often failures (which we don't need anyway):
- # - MongoDB (expired key)
- # - Apache Cassandra (missing Release file)
- - sudo rm -fv /etc/apt/sources.list.d/{mongodb,cassandra}*.list*
+ # travis-ci/travis-ci#9112: remove all third party repositories except ubuntu-toolchain-r-test
+ - if [ -f /etc/apt/sources.list.d/ubuntu-toolchain-r-test*.list ]; then
+ cp -v /etc/apt/sources.list.d/ubuntu-toolchain-r-test*.list /tmp
+ ; fi
+ - sudo rm -fv /etc/apt/sources.list.d/*
+ - if [ -f /tmp/ubuntu-toolchain-r-test*.list ]; then
+ sudo cp -v /tmp/ubuntu-toolchain-r-test*.list /etc/apt/sources.list.d/
+ ; fi
- sudo apt update --option Acquire::Retries=100 --option Acquire::http::Timeout="60"
# installing / removing dependencies