11

Is there any way to prevent yum from upgrading a package obsoleted by another?

I have created a custom repo containing some packages, among them openh323-devel. In current versions of CentOS, openh323 is marked as being obsoleted by OPAL, but I don't want to compile other software (namely YATE) against OPAL. I have openh323-devel installed, but every time I do yum update, it wants me to upgrade it to OPAL.

Is there any way I can tell yum that I permanently don't want to use OPAL (or any other superseding package for that matter) in a manner similar to apt pinning? Of course, I can --exclude specific packages, but that's not what I want.

2 Answers 2

13
sudo yum --setopt=obsoletes=0 install obsoleted-package

Or you can put

obsoletes=0

to

/etc/yum.conf

Both ways worked for me on Oracle Linux 6.7.

2

You should be able to permanently add an exclude rule by adding it to your /etc/yum.conf file. You can also use wildcards to exclude more than one package based on a pattern. Try:

exclude=*OPAL*
3
  • OK, thanks, but that's what I'm doing at the moment. What I was thinking about was some method to prevent yum from upgrading any obsoleted packages. Probably I'll just stay with this method.
    – galo
    May 19, 2011 at 6:37
  • If you don't want to upgrade ANYTHING why are you running yum at all?
    – Caleb
    May 19, 2011 at 8:15
  • Heh, I still want to update all other system packages (for security, patches, etc.), I just don't want yum to mess with my custom package. What makes it funnier is that if I put newer version of openh323 to my repo, yum still prefers opal over it. Apparently, excluding is a way to go here. Thanks again!
    – galo
    May 19, 2011 at 8:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .