Safe use of Third Party Repos

Because of the various number of repos out there, and the chance there might be a conflict of packages, it's best to ensure you prioritise what is important to update, and what is not.  By default, if you add the repos and do nothing more, sometimes you could end up with a dependency problem.  This happened for me when my system tried to update subversion from rpmforge on my system with an older package than what CentOS 5.2 had.  Luckily it wouldn't have worked anyway, but there are chances you might not want something upgrading.

We protect this with a yum plugin called yum-priorities.  First, install this:

yum install yum-priorities

then, modify the .repo files in /etc/yum.repos.d so that you set the priorities.  CentOS recommend that for base, addons, updates, extras you set a priority of 1.  For centosplus and contrib, you set a priority of 2, and for all others a priority of 3.  For me, I set all the CentOS repos to a priority of 1, and the third party repos as a priority of 3.  To do this, just edit the repo file and at the end of each section, add:


where N equals the priority you want to set for that repo.  As I mentioned, all the CentOS base, addons, updates, extras, centosplus and contrib - I have set to priority=1.  My third party repos, adobe-linux, arrfab, epel, epel-testing and rpmforge all have been set to  priority=3.