0

In most of linux distributions, we have package manager, when I using this command to install a package:

yum install demo-package

the yum will search the first package that match the installing if different repo have the same package? For eamcplem in the OS we have repo1/repo2/......repo6, if the package was in the repo6, the install will be slow?

1
  • Repo1=Base.repo , repo2=epel.repo don't have the same packages. Repo3=rpmfusion.repo is usually OK with no conflicts / no coincident versions. ........ All other 3party repos can conflict, and are not recommended enabled when doing yum ypdate . Aug 3 at 14:37
1

the yum will search the first package that match the installing if different repo have the same package?

No, it will always check all repositories and use the most recent version of the package that is not broken.

Details of how this is checked depend on your version of yum (you're most probably not using classical yum, but dnf underneath), its configuration, and thus, the actual Linux distro you're using.

For eamcplem in the OS we have repo1/repo2/......repo6, if the package was in the repo6, the install will be slow?

No, because yum always has to check all enabled repositories. Searching for a package of a given name is also not even remotely what takes time - it's the resolving of the dependencies (and thus, checking if things are installable at all), and the actual transaction.

4
  • if two repo have the same package same verion, a random package will pick?@Marcus Müller
    – Dolphin
    Aug 3 at 10:41
  • @Dolphin no, then the priorities as configured are used. Aug 3 at 10:42
  • what is the default priorities rule? do you know?@Marcus Müller
    – Dolphin
    Aug 3 at 10:43
  • 2
    ... I'm repeating myself: that is configured by your Linux distro. Look it up in the yum configuration, I can't tell you how your yum is configured. Aug 3 at 10:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.