From 587059ac64dcdd4496b6e5d895ff88c4659307a4 Mon Sep 17 00:00:00 2001 From: Prashanth684 Date: Wed, 5 Mar 2025 21:43:06 -0800 Subject: [PATCH] ci/get-ocp-repo.sh: add --enablerepo when installing centos packages This PR: https://github.com/openshift/release/pull/62296 now builds scos images. The extensions image build hit this error: ``` INFO: Neutering RHEL repos for SCOS centos-stream-release-9.0-26.el9.noarch package centos-release-cloud is not installed Updating Subscription Management repositories. Unable to read consumer identity This system is not registered with an entitlement server. You can use subscription-manager to register. Error: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d". ``` This is because the centos-release* repos are disabled in the node image which is used for building extensions --- ci/get-ocp-repo.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/get-ocp-repo.sh b/ci/get-ocp-repo.sh index e50b391fe..fd7ae92e6 100755 --- a/ci/get-ocp-repo.sh +++ b/ci/get-ocp-repo.sh @@ -52,8 +52,9 @@ cleanup_repos() { create_gpg_keys() { # Check if centos-stream-release is installed and centos-release-cloud is not + # enablerepo added in case the repo is disabled (when building extensions) if rpm -q centos-stream-release && ! rpm -q centos-release-cloud; then - dnf install -y centos-release-{cloud,nfv,virt}-common + dnf install -y centos-release-{cloud,nfv,virt}-common --enablerepo extras-common fi # Create directory for CentOS distribution GPG keys