Excluding buggy RPMs from a yum repository

September 22, 2005

We mirror the Fedora Core 4 updates area, and we use yum to install things from it, and Red Hat recently released an extremely unsuitable (for us) update to xorg-x11 (as recounted in MoreFC4Problems). So we needed to take those buggy RPMs out of circulation and keep them out.

Fortunately this turns out to be pretty easy, because not all RPMs in a directory have to be in the repository metadata that yum uses. This let us continue to pull a full mirror from Red Hat (keeping the mirroring script simple) and just built our own metadata that excludes the buggy RPMs we don't want.

Modern yum repository metadata is created with the createrepo command (not yum-arch, despite the latter being packaged with yum and the former not), which is in the createrepo RPM. createrepo has a -x option to exclude RPMs from the metadata it makes; -x even takes a glob pattern, like say xorg-x11-*6.8.2-37.FC4.48.1* (remember to quote it).

There are two drawbacks with this:

  1. createrepo takes a while to run.
  2. We're now dependent on having a Fedora Core 4 machine around to run the mirroring on (because we probably need to use a createrepo version that matches the Fedora Core 4 yum, so they agree on the metadata format).

Hopefully someday Red Hat will fix the bugs and we can go back to using all of the current updates and thus to just mirroring the update repository metadata as well as all of the RPMs.

(Because we are only ignoring a specific version of xorg-x11, yum will include the previous, working Fedora Core 4 xorg-x11 update in the metadata. Which is what we want, because we definitely want that update installed.)

Written on 22 September 2005.
« More Fedora Core 4 problems with X
The (probable) importance of accurate Content-Types »

Page tools: View Source, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Thu Sep 22 01:49:35 2005
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.