diff options
Diffstat (limited to 'contrib/ci/distro.sh')
-rw-r--r-- | contrib/ci/distro.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/contrib/ci/distro.sh b/contrib/ci/distro.sh index da797d02f..374e55696 100644 --- a/contrib/ci/distro.sh +++ b/contrib/ci/distro.sh @@ -50,11 +50,19 @@ function distro_pkg_install() { declare prompt=$'Need root permissions to install packages.\n' prompt+="Enter sudo password for $USER: " - if [[ "$DISTRO_BRANCH" == -redhat-* ]]; then + if [[ "$DISTRO_BRANCH" == -redhat-fedora-2[2-9]* ]]; then + # TODO switch fedora to DNF once + # https://bugzilla.redhat.com/show_bug.cgi?id=1215208 is fixed + [ $# != 0 ] && sudo -p "$prompt" \ + yum-deprecated --assumeyes install -- "$@" |& + # Pass input to output, fail if a missing package is reported + awk 'BEGIN {s=0} + /^No package .* available.$/ {s=1} + {print} + END {exit s}' + elif [[ "$DISTRO_BRANCH" == -redhat-* ]]; then [ $# != 0 ] && sudo -p "$prompt" yum --assumeyes install -- "$@" |& # Pass input to output, fail if a missing package is reported - # TODO Remove and switch to DNF once - # https://bugzilla.redhat.com/show_bug.cgi?id=1215208 is fixed awk 'BEGIN {s=0} /^No package .* available.$/ {s=1} {print} |