How does `yum` prioritize repositories while installing packages?

Solution Unverified - Updated -

Issue

  • There are two packages with exact the same name and same version in two enabled repositories.
  • For example enabled repository #1 has a name alpha_repo and enabled repositor #2 has a name beta_repo, both of these repositories have this package php-mysql-5.4.6-1.x86_64.rpm.
  • When user will do yum install php-mysql from which repository yum will choose the package?
  • Is it correct to state that yum in this case will choose the repository in natural order?
  • Meaning will select by alphabetically sorting order, hence from alpha_repo?

Environment

  • Red Hat Enterprise Linux 5/6
  • Yum

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content