May 28th, 2010
How to protect one Yum repo’s packages from being replaced by packages from another source?
How to protect one Yum repo’s packages from being replaced by packages from another source?
If we use two different repositories, each holding a different version of the same package, only the latest of the two will be installed if you use yum to update that package. This can lead to problems if the third party repository contains a newer version of a core system package than the Red Hat repository.
The yum-protectbase plugin will protect files of the base repository from being replaced by packages from a third party repository.
To install the plugin, use this command:
This will install the plugin and its basic configuration file, /etc/yum/pluginconf.d/protectbase.conf
Setting are stored under /etc/yum/pluginconf.d/rhnplugin.conf with a section name matching the repo.id of the channel. You need to add :
To protect a different repository, go to its configuration file in /etc/yum.repos.d/repository.repo and add this line to its configuration
Add
…
protect = 1
You will need to add this for each repository which needs to be protected.