how to have yum prefer one dependency over others

seth vidal skvidal at fedoraproject.org
Fri Sep 16 16:36:34 UTC 2011


On Fri, 2011-09-16 at 11:33 -0500, Matyas Selmeci wrote:
> 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?

Here is how yum does comparison between multiple package providing the
same thing:

http://yum.baseurl.org/wiki/CompareProviders

if you follow that as your guide you can probably make one of them be
the default choice.

-sv




More information about the devel mailing list