From 4b1aa6020937d938f74f7d691ec3c09e8c645075 Mon Sep 17 00:00:00 2001
From: Markos Chandras <mchandras@suse.de>
Date: Wed, 8 Aug 2018 14:49:34 +0300
Subject: scripts: start-new-vm: Do not upgrade packages on the host

Upgrading the host could bring undesired side effects so we should
not do that as part of CI deployment.

Change-Id: Ib776cdf96943e22155c2dd47fdadb3e8a86f6143
Signed-off-by: Markos Chandras <mchandras@suse.de>
---
 xci/scripts/vm/start-new-vm.sh | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/xci/scripts/vm/start-new-vm.sh b/xci/scripts/vm/start-new-vm.sh
index ecc2998d..9eab0e5a 100755
--- a/xci/scripts/vm/start-new-vm.sh
+++ b/xci/scripts/vm/start-new-vm.sh
@@ -119,17 +119,14 @@ COMMON_DISTRO_PKGS=(vim strace gdb htop dnsmasq docker iptables ebtables virt-ma
 
 case ${ID,,} in
 	*suse*)
-		pkg_mgr_cmd="sudo zypper -q -n ref"
-		pkg_mgr_cmd+=" && sudo zypper -q -n install ${COMMON_DISTRO_PKGS[@]} qemu-tools libvirt-daemon libvirt-client libvirt-daemon-driver-qemu"
+		pkg_mgr_cmd="sudo zypper -q -n install ${COMMON_DISTRO_PKGS[@]} qemu-tools libvirt-daemon libvirt-client libvirt-daemon-driver-qemu"
 		;;
 	centos)
-		pkg_mgr_cmd="yum updateinfo"
-		pkg_mgr_cmd+=" && sudo yum install -q -y epel-release"
-		pkg_mgr_cmd+=" && sudo yum install -q -y in ${COMMON_DISTRO_PKGS[@]} qemu-kvm-tools qemu-img libvirt-daemon-kvm"
+		pkg_mgr_cmd="sudo yum install -C -q -y epel-release"
+		pkg_mgr_cmd+=" && sudo yum install -C -q -y in ${COMMON_DISTRO_PKGS[@]} qemu-kvm-tools qemu-img libvirt-daemon-kvm"
 		;;
 	ubuntu)
-		pkg_mgr_cmd="sudo apt-get update"
-		pkg_mgr_cmd+=" && sudo apt-get install -y -q=3 ${COMMON_DISTRO_PKGS[@]} libvirt-bin qemu-utils docker.io"
+		pkg_mgr_cmd="sudo apt-get install --no-upgrade -y -q=3 ${COMMON_DISTRO_PKGS[@]} libvirt-bin qemu-utils docker.io"
 		;;
 esac
 
-- 
cgit