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:

yum install yum-protectbase

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 of the channel. You need to add :

protect = yes

To protect a different repository, go to its configuration file in /etc/yum.repos.d/repository.repo and add this line to its configuration




protect = 1

You will need to add this for each repository which needs to be protected.

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.