Excluding a bad RPM package

Posted by code_monkey_steve on May 12, 2011 May 12

I’m a big fan of KDE, as both a user and a developer, and Akregator is my RSS feed reader of choice. I’m also a big fan of RSS feeds, using them for almost all my regular daily information consumption.

So imagine my notable lack of delight when, after doing a regular YUM update, I discovered that the latest version of Akregator has a serious bug that makes it almost unusable. And I didn’t even want the new version anyway.

Ah, but since I’m using RPM and YUM, the fix for this sort of thing is actually pretty simple, although it took me a few minutes of reading man pages to work it out, so I thought I should share the fruits of my labor. Here’s how you exclude a bad RPM package:

First, find the last good version of the appropriate package:

$ rpm -qf `which akregator`

$ sudo yum list kdepim --showduplicates
Installed Packages
kdepim.x86_64        7:
Available Packages
kdepim.x86_64        6:4.4.6-2.fc14
kdepim.x86_64        7:

In this case, the desired version is 4.4.6 (the “6:” is the epoch, the “-2” is the release, and the “fc14” is the architecture).

Next, downgrade the package. If there are any dependency errors, you’ll also need to downgrade those packages too.

$ sudo yum downgrade kdepim-4.4.6
Error: Package: 7:kdepim-libs-

$ sudo yum downgrade kdepim-4.4.6 kdepim-libs
  kdepim.x86_64 7:                                                   kdepim-libs.x86_64 7:

  kdepim.x86_64 6:4.4.6-2.fc14                                                      kdepim-libs.x86_64 6:4.4.6-2.fc14


And finally, edit /etc/yum.conf and add the offending package version to an exclude line:

exclude=kdepim- kdepim-libs-

Take that, kdepims-4.4.11. plonk