CentOS 7 yum-cron enablerepo and disablerepo options

Michal Domonkos mdomonko at redhat.com
Tue Jan 2 10:43:01 UTC 2018


Hi Dan,

On Thu, Dec 21, 2017 at 12:46 PM, Dan Bullock <bullockdan1 at gmail.com> wrote:
> Does yum-cron (CentOS 7) support the use of disablerepo and enablerepo?  My
> need is to be able to provide automated OS updates, but disable any non-OS
> repo's on the server.  CentOS 6 solution is setting /etc/sysconfig/yum-cron
> YUM_PARAMETER to:
>
> "--disablerepo="*" --enablerepo=repo1,repo2,repo3"
>
> I know the base section of yum-cron.conf can handle exclude = "package".
> Where can I find documentation for /etc/yum/yum-cron.conf for options not
> included in the initial configuration file?

Unfortunately, yum-cron (since the rewrite from bash to python in el7)
doesn't support this.

The only way to accomplish this is to disable the repos permanently in
/etc/yum.repos.d/, which probably isn't what you desire, however.

If you wish to have this functionality added upstream, please create
an issue at github.com/rpm-software-management/yum or file a BZ at
bugzilla.redhat.com (against the yum component). Or, if you decide to
implement this yourself, a PR would be welcome :)

Thanks!


More information about the Yum-devel mailing list