pkgdep/rhel: Check if given repos can be enabled
In recent Centos8 updates name of the "PowerTools" repo was changed to "powertools". Since config-manager will fail if we provide a faulty name of the repo, we need to make sure we tell it to enable what's actually present on the system. Signed-off-by: Michal Berger <michalx.berger@intel.com> Change-Id: Iff0c6103d1375fc42f5c967cd713e3e5089f4723 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5478 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com>
This commit is contained in:
parent
2f6afea662
commit
3edb26fb0e
@ -25,6 +25,8 @@ disclaimer() {
|
||||
esac
|
||||
}
|
||||
|
||||
is_repo() { yum repolist --all | grep -q "^$1"; }
|
||||
|
||||
disclaimer
|
||||
|
||||
# First, add extra EPEL, ELRepo, Ceph repos to have a chance of covering most of the packages
|
||||
@ -47,7 +49,10 @@ if [[ $ID == centos || $ID == rhel ]]; then
|
||||
repos+=("https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm")
|
||||
[[ $ID == centos ]] && repos+=("centos-release-ceph-nautilus.noarch")
|
||||
# Add PowerTools needed for install CUnit-devel in Centos8
|
||||
[[ $ID == centos ]] && enable+=("PowerTools")
|
||||
if [[ $ID == centos ]]; then
|
||||
is_repo "PowerTools" && enable+=("PowerTools")
|
||||
is_repo "powertools" && enable+=("powertools")
|
||||
fi
|
||||
fi
|
||||
if ((${#repos[@]} > 0)); then
|
||||
yum install -y "${repos[@]}" yum-utils
|
||||
|
Loading…
Reference in New Issue
Block a user