There is another option mentioned in the archive, about updating 
/etc/yum.conf with a new reposdir=.  This avoids updating/creating the 
repositories when the CentOS release rpm is updated with the next kernel 
release.   Oracle and Redhat do not include the repository information in 
the primary release rpm, but provide optional rpms or methods to install 
the repositories.  By separating the functionality of the rpm, this avoids 
these issues.  I wish CentOS would follow the same process as well.

https://www.redhat.com/archives/spacewalk-list/2018-February/msg00033.html

# rpm -ql centos-release-7-5.1804.5.el7.centos.x86_64 |grep repo

/etc/yum.repos.d/CentOS-Base.repo
/etc/yum.repos.d/CentOS-CR.repo
/etc/yum.repos.d/CentOS-Debuginfo.repo
/etc/yum.repos.d/CentOS-Media.repo
/etc/yum.repos.d/CentOS-Sources.repo
/etc/yum.repos.d/CentOS-Vault.repo
/etc/yum.repos.d/CentOS-fasttrack.repo

# rpm -ql oraclelinux-release-7.5-1.0.5.el7.x86_64 |grep repo
#

- Thanks and good luck



From:   "p.cook...@bham.ac.uk" <p.cook...@bham.ac.uk>
To:     "spacewalk-list@redhat.com" <spacewalk-list@redhat.com>
Date:   02/22/2019 07:39 AM
Subject:        Re: [Spacewalk-list] Disable downloading stock repos in 
CentOS
Sent by:        spacewalk-list-boun...@redhat.com



This email originated from outside of the company. Please use discretion 
if opening attachments or clicking on links.

 
Hi Paul
 
There are a few options to disable existing repo’s really:
 
1.       Move existing related repo files to a different location (like 
you’ve described).
 
mkdir /root/Original_Repos
mv /etc/yum.repos.d/* /root/Original_Repos/
yum clean all and/or rm -rf /var/cache/yum
 
2.       Temporarily disable during update.
 
yum --disablerepo=<Repo Name> update
 
3.       Permanently disable.
 
Change the value of “enabled=” from 1 to 0 in /etc/yum.repos.d/<Repo Name>
 
Regards
Phil
 
 
 
From: spacewalk-list-boun...@redhat.com 
<spacewalk-list-boun...@redhat.com> On Behalf Of pdev...@uottawa.ca
Sent: 22 February 2019 12:52
To: spacewalk-list@redhat.com
Subject: [Spacewalk-list] Disable downloading stock repos in CentOS
 
Hello,
 
I would like to disable the downloading of the stock repos like 
Centos-Base.repo and the rest They get in the way when I perform upgrades 
(unless I'm doing something wrong?) I usually move the repos to a 
different directory so that yum does not see them.
 
Thank you,

-- 
Paul Deveau
Analyste de systèmes principal|Senior Systems Analyst
Technologies de l’information|Information Technology
Université d’Ottawa|University of Ottawa
_______________________________________________
Spacewalk-list mailing list
Spacewalk-list@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list



**

This email and any attachments may contain information that is confidential 
and/or privileged for the sole use of the intended recipient.  Any use, review, 
disclosure, copying, distribution or reliance by others, and any forwarding of 
this email or its contents, without the express permission of the sender is 
strictly prohibited by law.  If you are not the intended recipient, please 
contact the sender immediately, delete the e-mail and destroy all copies.
**
_______________________________________________
Spacewalk-list mailing list
Spacewalk-list@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list

Reply via email to