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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.