how to have yum prefer one dependency over others

Matyas Selmeci matyas at
Fri Sep 16 16:33:29 UTC 2011

Hi all,

Hope it's okay to ask for general RPM/Yum advice here.

We have several packages that require grid CA certificates to be
installed. There are multiple sets of grid certificates, and we want to
leave up to individual sites which set to install. We also want to give
the sites the option to install none of them if they know what they are
doing and want to manage certificates by themselves.

So what we do is we add to each package that requires grid certificates
a 'Requires: grid-certificates' line, and to each package that provides
grid certificates a 'Provides: grid-certificates' line. We also create a
dummy package, called 'no-ca-certs' that does nothing but provide the
grid-certificates dependency.

We want to set it up so that one of these certs packages is preferred
over the others, so that if the user doesn't explicitly choose which one
to install, then that package is installed by default. How can we do
that? We tried having the packages provide different versions of the
grid-certificates virtual dependency (i.e. no-ca-certs would have
'Provides: grid-certificates = 1', osg-ca-certs (which we prefer) would
have 'Provides: grid-certificates = 2') in hopes that yum would pick the
one with the highest version, but it didn't help. Any ideas?

-Matyas Selmeci

More information about the devel mailing list