Add ability to build amp image on SUSE
SUSE distros need to use rpm to check for existance of packages and the check on qemu-img fails with the current script. Change-Id: Ieffba6714852eabbb7b6b6da5090d10ed904998c Closes-bug: 1707310
This commit is contained in:
parent
6c1d424776
commit
404e8ad63a
@ -266,7 +266,16 @@ if [ "$platform" = 'NAME="Ubuntu"' ]; then
|
|||||||
echo "Earlier versions don't support the extended attributes required."
|
echo "Earlier versions don't support the extended attributes required."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
elif [[ $platform =~ "SUSE" ]]; then
|
||||||
|
# OpenSUSE
|
||||||
|
# use rpm -q to check for qemu-tools and git-core
|
||||||
|
PKG_LIST="qemu-tools git-core"
|
||||||
|
for pkg in $PKG_LIST; do
|
||||||
|
if ! rpm -q $pkg &> /dev/null; then
|
||||||
|
echo "Required package " ${pkg/\*} " is not installed. Exiting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
else
|
else
|
||||||
# fedora/centos/rhel
|
# fedora/centos/rhel
|
||||||
# Actual qemu-img name may be qemu-img, qemu-img-ev, qemu-img-rhev, ...
|
# Actual qemu-img name may be qemu-img, qemu-img-ev, qemu-img-rhev, ...
|
||||||
|
Loading…
Reference in New Issue
Block a user