From a70326a2769c012b456f436967e2de3de4fbf255 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Tue, 9 Aug 2022 06:38:25 -0700 Subject: [PATCH] Tweak crb script, Recommends dnf-command(config-manager) (#2115602) --- crb | 7 +++++++ epel-release.spec | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/crb b/crb index 6e99ddf..376b308 100755 --- a/crb +++ b/crb @@ -46,6 +46,13 @@ enable_disable_repo(){ # Only RHEL has a repo with codeready in it, use subcription-manager subscription-manager repos ${command} ${crb_repo} else + # Determine if dnf-command(config-manager) is installed + if ! rpm -q --whatprovides 'dnf-command(config-manager)' > /dev/null 2>&1 ; then + echo "Error: Please run: dnf install 'dnf-command(config-manager)'" >&2 + echo " before trying to enable/disable the CRB repo." >&2 + echo "Aborting"'!' >&2 + exit 1 + fi # Everything else uses dnf config-manager dnf config-manager ${command} ${crb_repo} fi diff --git a/epel-release.spec b/epel-release.spec index b3c4005..27510dd 100644 --- a/epel-release.spec +++ b/epel-release.spec @@ -5,7 +5,7 @@ Name: epel-release Version: 9 -Release: 3%{dist} +Release: 4%{dist} Summary: Extra Packages for Enterprise Linux repository configuration License: GPLv2 @@ -35,6 +35,9 @@ BuildArch: noarch Requires: redhat-release >= %{version} # epel-release is only for enterprise linux, not fedora Conflicts: fedora-release +# crb needs config-manager to run +# But only recommend it, incase people do not need crb +Recommends: dnf-command(config-manager) %if %{with next} Recommends: (epel-next-release if centos-stream-release) %endif @@ -122,6 +125,9 @@ fi %changelog +* Tue Aug 09 2022 Troy Dawson - 9-4 +- Tweak crb script, Recommends dnf-command(config-manager) (#2115602) + * Wed Jun 29 2022 Troy Dawson - 9-3 - Add crb script