From 0d5eb67eeead87550d73c727c3e8c470621fd288 Mon Sep 17 00:00:00 2001 From: Carlos Goncalves Date: Mon, 24 Dec 2018 03:13:40 +0100 Subject: [PATCH] Workaround for a dnf bug Work-around RHBZ #1636909 by using rpm instead of yum or dnf. The alternative would be running with privileges, which would start requiring sudo permissions. Change-Id: Ie20a4865a464c7840644fd790ccac0d201b91187 --- diskimage-create/diskimage-create.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/diskimage-create/diskimage-create.sh b/diskimage-create/diskimage-create.sh index 0560f2a676..3f30231e56 100755 --- a/diskimage-create/diskimage-create.sh +++ b/diskimage-create/diskimage-create.sh @@ -309,10 +309,9 @@ else # fedora/centos/rhel # Actual qemu-img name may be qemu-img, qemu-img-ev, qemu-img-rhev, ... # "dnf|yum install qemu-img" works for all, but search requires wildcard - PKG_MGR=$(which dnf &>/dev/null && echo dnf || echo yum) PKG_LIST="qemu-img* git" for pkg in $PKG_LIST; do - if ! $PKG_MGR info installed $pkg &> /dev/null; then + if ! rpm -qa $pkg ; then echo "Required package " ${pkg/\*} " is not installed. Exiting." exit 1 fi