Details

What is the resolution order of YUM client for RPM repositories?

AuthorFullName__c
Nimer Bsoul
articleNumber
000004403
ft:sourceType
Salesforce
FirstPublishedDate
2019-06-06T13:59:02Z
lastModifiedDate
2023-01-22T11:08:15Z
VersionNumber
4
The configuration file for YUM client and it's related utilities are located at /etc/yum.conf. This file contains one mandatory [main] section, which allows you to set YUM options that have global effect, and can also contain one or more [repository] sections, which allows you to set repository-specific options.
It is recommended to define individual repositories in new or existing .repo files in the /etc/yum.repos.d/ directory.
The values you define in individual [repository] sections of the /etc/yum.conf file override values set in the [main] section.
Let's say you have multiple repositories under /etc/yum.repos.d/ such as artifactory.conf the YUM client will resolve the packages starting by an alphabetical resolution order.
To check the order of repositories, you can run the command $ sudo yum repolist all to get the repositories order and if they are enabled or disabled.
If you would like to disable one of the repositories to not be as package source which is configured as part of <name>.repo , you can edit the directive named enabled and set it to 0.

Example of a yum.conf file:

[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=True
ip_resolve=4


Example of Artifactory as a repository source for YUM client (artifactory.repo):

[Artifactory]
name=Artifactory
baseurl=http://<ARTIFACTORY_URL>/rpm/<PATH_TO_REPODATA_FOLDER>
enabled=1
gpgcheck=0
#Optional - if you have GPG signing keys installed, use the below flags to verify the repository metadata signature:
#gpgkey=http://<ARTIFACTORY_URL>/rpm/<PATH_TO_REPODATA_FOLDER>/repomd.xml.key
#repo_gpgcheck=1