Tweak crb script, Recommends dnf-command(config-manager) (#2115602)

epel9
Troy Dawson 2 years ago
parent 3750a54112
commit a70326a276

7
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

@ -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 <tdawson@redhat.com> - 9-4
- Tweak crb script, Recommends dnf-command(config-manager) (#2115602)
* Wed Jun 29 2022 Troy Dawson <tdawson@redhat.com> - 9-3
- Add crb script

Loading…
Cancel
Save