Fix rdo-release install

The URL for rdo-release package is version-less and redirects to latest
stable version. This becomes problematic when stacking older stable
versions as dependencies might not be met or newer and incompatibile
ones might get installed.

Closes-Bug: #1833696

Change-Id: Icb07dcb4c9a3950a3c31a3a8dcb8d0b4c713fdb1
This commit is contained in:
Carlos Goncalves 2019-06-21 13:13:40 +02:00
parent 8ab64b3236
commit 8b31dce38b
1 changed files with 7 additions and 1 deletions

View File

@ -331,7 +331,13 @@ function _install_rdo {
# Per the point above, it's a bunch of repos so starts getting a
# little messy...
if ! is_package_installed rdo-release ; then
yum_install https://rdoproject.org/repos/rdo-release.rpm
if [[ "$TARGET_BRANCH" == "master" ]]; then
yum_install https://rdoproject.org/repos/rdo-release.rpm
else
# Get latest rdo-release-$rdo_release RPM package version
rdo_release=$(echo $TARGET_BRANCH | sed "s|stable/||g")
yum_install https://rdoproject.org/repos/openstack-$rdo_release/rdo-release-$rdo_release.rpm
fi
fi
# Also enable optional for RHEL7 proper. Note this is a silent