diff --git a/icinga-build-rpm-binary b/icinga-build-rpm-binary index 60d260d6ab19e01dd5fb6a20069efedd00d065e2..cd676f08457a558210e0fb737170ee5ee358560c 100755 --- a/icinga-build-rpm-binary +++ b/icinga-build-rpm-binary @@ -41,9 +41,16 @@ echo "[ Installing build dependencies ]" case "$ICINGA_BUILD_OS" in opensuse*|sles) ( - set -ex - # shellcheck disable=SC2046 - run-retry-timeout sudo zypper --non-interactive install $(rpm -qpR "${source_rpm}") + if ! requires="$(rpm -qpR "${source_rpm}")"; then + echo "Could not lookup requires in source RPM!" >&2 + exit 1 + fi + + echo "Found required: $requires" + if [ -n "$requires" ]; then + set -ex + run-retry-timeout sudo zypper --non-interactive install + fi ) ;; *)