test/vm_setup.sh: prioritize dnf over yum

It is possible to have yum on Fedora (either manual install
or via upgrade), yet dnf is the default pkg manager there.
Re-order the list of checks to pick dnf first if available.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I48dfda2a248a7798c9d0c8b3cb4b8a3aa615e2a7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3057
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Tomasz Zawadzki 2020-06-25 07:46:26 -04:00
parent 8bfb8c6a65
commit d09acccfe2

View File

@ -62,10 +62,10 @@ rootdir=$(readlink -f "$vmsetupdir/../../../")
managers=("$vmsetupdir/pkgdep/"*)
# Get package manager #
if hash yum &> /dev/null; then
source "$vmsetupdir/pkgdep/yum"
elif hash dnf &> /dev/null; then
if hash dnf &> /dev/null; then
source "$vmsetupdir/pkgdep/dnf"
elif hash yum &> /dev/null; then
source "$vmsetupdir/pkgdep/yum"
elif hash apt-get &> /dev/null; then
source "$vmsetupdir/pkgdep/apt-get"
elif hash pacman &> /dev/null; then