From e728ad6988a15c71376860b1ea6eaedcce15fa4e Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Mon, 25 Sep 2017 22:00:59 +0100 Subject: xci: file: Update package metadata before installing packages We may have old or no metadata for packages at all so package installations may fail. As such, lets sync with upstream mirrors before we try to install any packages. Change-Id: I15f73e46d4f0cae2c50d23a92e0f4da83821039e Signed-off-by: Markos Chandras --- xci/file/install-ansible.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xci/file') diff --git a/xci/file/install-ansible.sh b/xci/file/install-ansible.sh index 16ff86c8..85d02d09 100644 --- a/xci/file/install-ansible.sh +++ b/xci/file/install-ansible.sh @@ -33,6 +33,7 @@ if [ -x '/usr/bin/zypper' ]; then [openssl]=openssl ) EXTRA_PKG_DEPS=( python-xml ) + sudo zypper -n ref # NOTE (cinerama): we can't install python without removing this package # if it exists if $(${CHECK_CMD} patterns-openSUSE-minimal_base-conflicts &> /dev/null); then @@ -54,6 +55,7 @@ elif [ -x '/usr/bin/apt-get' ]; then [openssl]=openssl ) EXTRA_PKG_DEPS=() + sudo apt-get update elif [ -x '/usr/bin/dnf' ] || [ -x '/usr/bin/yum' ]; then OS_FAMILY="RedHat" PKG_MANAGER=$(which dnf || which yum) @@ -71,6 +73,7 @@ elif [ -x '/usr/bin/dnf' ] || [ -x '/usr/bin/yum' ]; then [wget]=wget [openssl]=openssl ) + sudo yum update --assumeno EXTRA_PKG_DEPS=() else echo "ERROR: Supported package manager not found. Supported: apt,yum,zypper" -- cgit 1.2.3-korg