Steve Baker cb216b6cd8 Add DIB_IPA_HARDWARE_RDO to define repo behaviour
Currently the latest RDO repo is installed on centos9
for the python-hardware package. This would not be appropriate in the
following cases:
* When repos are copied in from the host via DIB_YUM_REPO_CONF
* When another element is responsible for setting up repos

This change adds environment variable DIB_IPA_HARDWARE_RDO, which will
only be set to `1` on centos9, when DIB_YUM_REPO_CONF isn't set, and
when the user hasn't explicitly set DIB_IPA_HARDWARE_RDO.

This retains the current default behaviour of just working, while
giving flexibility for repos to be set up another way.

Change-Id: I1cc0b9833baf642866e9762c6bae44360bffe20d
2023-03-16 14:42:20 +13:00

10 lines
246 B
Bash
Executable File

#!/bin/bash
# It enables RDO deps repo when DIB_IPA_HARDWARE_RDO=1
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
fi