diff --git a/test/common/config/pkgdep/git b/test/common/config/pkgdep/git index 9c4677b68..b4563439d 100644 --- a/test/common/config/pkgdep/git +++ b/test/common/config/pkgdep/git @@ -246,12 +246,9 @@ function install_libiscsi() { function install_git() { if type -P git; then - if [[ $(sort -V) == "$GIT_VERSION"* ]]; then - # Our version is on top, meaning there's a newer git version installed - # or we already have matching one on board. Either way, we don't need - # to do anything, return. + if ge "$(git --version | awk '{print $3}')" "$GIT_VERSION"; then return 0 - fi <<< "$GIT_VERSION"$'\n'"$(git --version)" + fi fi >/dev/null install zlib-devel curl-devel diff --git a/test/common/config/vm_setup.sh b/test/common/config/vm_setup.sh index d920790f0..5a25103c8 100755 --- a/test/common/config/vm_setup.sh +++ b/test/common/config/vm_setup.sh @@ -101,6 +101,7 @@ function detect_package_manager() { vmsetupdir=$(readlink -f "$(dirname "$0")") rootdir=$(readlink -f "$vmsetupdir/../../../") +source "$rootdir/scripts/common.sh" set_os_id_version detect_package_manager