vm_setup: Move gcc version check to git sources

In case vm_setup.sh is called on a bare system (e.g. cloud image), it
will instantly fail since gcc won't be on board, forcing user to either
install it by itself or by running our pkgdep.sh first.

Moving this check to pkgdep/git will mitigate similar issues since
before it's sourced, an $INSTALL portion of the script will have a
chance to run pkgdep.sh on its own (this still depends on user running
vm_setup.sh with -i arg, but still ;)).

Change-Id: I309ca42e8ea15fd14e416fc85fa0e244de2d8262
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2785
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
This commit is contained in:
Michal Berger 2020-06-05 15:17:14 +02:00 committed by Tomasz Zawadzki
parent 7d2b98a770
commit 0ccf1fc36b
2 changed files with 1 additions and 1 deletions

View File

@ -300,6 +300,7 @@ export DRIVER_LOCATION_QAT
export GIT_REPO_GIT
GIT_REPOS=${GIT_REPOS:-$HOME}
gcc_version=$(gcc -dumpversion) gcc_version=${gcc_version%%.*}
if [[ $ID == centos ]] && (( VERSION_ID == 7 )); then
# install proper version of the git first
install_git

View File

@ -29,7 +29,6 @@ VM_SETUP_PATH=$(readlink -f ${BASH_SOURCE%/*})
UPGRADE=false
INSTALL=false
CONF="rocksdb,fio,flamegraph,tsocks,qemu,vpp,libiscsi,nvmecli,qat,spdk,refspdk"
gcc_version=$(gcc -dumpversion) gcc_version=${gcc_version%%.*}
if [[ -e /etc/os-release ]]; then
source /etc/os-release