diff options
author | Markos Chandras <mchandras@suse.de> | 2017-09-25 22:00:59 +0100 |
---|---|---|
committer | Markos Chandras <mchandras@suse.de> | 2017-09-25 22:05:21 +0100 |
commit | e728ad6988a15c71376860b1ea6eaedcce15fa4e (patch) | |
tree | 6c96454d232790401bccd93fce90c4562b5e2374 /xci/file | |
parent | 18a97988b9cf90dc92d6d9abbb7420c64ed6a0e1 (diff) |
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 <mchandras@suse.de>
Diffstat (limited to 'xci/file')
-rw-r--r-- | xci/file/install-ansible.sh | 3 |
1 files changed, 3 insertions, 0 deletions
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" |