Merge "Add DIB_IPA_HARDWARE_RDO to define repo behaviour"

This commit is contained in:
Zuul 2023-03-21 12:41:48 +00:00 committed by Gerrit Code Review
commit 1949d5c09b
3 changed files with 21 additions and 2 deletions

View File

@ -19,3 +19,5 @@ doing a source-based installation:
* ``DIB_IPA_HARDWARE_VERSION`` the version of the ``hardware`` package to * ``DIB_IPA_HARDWARE_VERSION`` the version of the ``hardware`` package to
install when ``DIB_IPA_HARDWARE_PACKAGE`` is unset. If unset, the latest install when ``DIB_IPA_HARDWARE_PACKAGE`` is unset. If unset, the latest
version will be installed. version will be installed.
* ``DIB_IPA_HARDWARE_RDO`` set to ``0`` to prevent the latest RDO package repositories
being installed on CentOS-9-Stream (ignored when ``DIB_YUM_REPO_CONF`` is set).

View File

@ -0,0 +1,14 @@
if [[ "${DISTRO_NAME}${DIB_RELEASE}" =~ "centos9" ]]; then
if [ -n "${DIB_YUM_REPO_CONF:-}" ] ; then
# Always disable if DIB_YUM_REPO_CONF is defined
export DIB_IPA_HARDWARE_RDO=0
else
# Default to enabled, but overridable by the host
export DIB_IPA_HARDWARE_RDO=${DIB_IPA_HARDWARE_RDO:-1}
fi
else
# Always disable if not centos-9
export DIB_IPA_HARDWARE_RDO=0
fi

View File

@ -1,6 +1,9 @@
#!/bin/bash #!/bin/bash
# It enables RDO deps repo for CentOS Stream 9 # It enables RDO deps repo when DIB_IPA_HARDWARE_RDO=1
if [[ "${DISTRO_NAME}${DIB_RELEASE}" =~ "centos9" ]]; then set -eux
set -o pipefail
if [ ${DIB_IPA_HARDWARE_RDO:-0} -ne 0 ]; then
curl -o /etc/yum.repos.d/dlrn-deps.repo https://trunk.rdoproject.org/centos9-master/dlrn-deps.repo curl -o /etc/yum.repos.d/dlrn-deps.repo https://trunk.rdoproject.org/centos9-master/dlrn-deps.repo
fi fi