2

What is the philosophy behind the prioritization of repositories when Ubuntu tries to install or update an app?

As I learned from this answer, when we have the highest version in the repository, the order of repositories in sources.list file determines the priority. But in the case that repositories have been added to sources.list.d, which principle will be used fir prioritization?

Also in the case that I want to know the priority using command, I learned from this answer that I can use apt-cache policy.

Zanna
  • 70,465
  • If version be same, what is priority? – Alireza Alipour Jan 23 '19 at 08:59
  • https://askubuntu.com/a/729201/158442 says which ever repository is listed first, so probably universe. Though that doesn't usually happen (PPA versions usually indicate they're from a PPA). – Olorin Jan 23 '19 at 09:06
  • Thanks, but my repository(i.e the Inkscape Stable PPA) have been added to "sources.list.d" folder. In this case what is priority? – Alireza Alipour Jan 23 '19 at 14:20
  • Answered in BOTH of the duplicates. Please read them. – user535733 Jan 23 '19 at 14:55
  • OK, unfortunately I don't read carefully this answer, now I know which of repository have been used to installing my package(i.e the Inkscape Stable PPA), but I want to know the philosophy behind of it specially in the case that we use "sources.list.d" folder. As I know the order of repository in "sources.list" file will determine priority when we have same highest versions but in the case of "sources.list.d" folder, what is the principle to prioritization in the case of same highest versions? – Alireza Alipour Jan 23 '19 at 15:24
  • The same: the order in which the repo appears. sources.list first, files in sources.list.d later, in lexicographic order. – Olorin Jan 24 '19 at 06:14
  • Thank you very much, so the only way to prioritization is changing file names of files in sources.list.d, is it right? – Alireza Alipour Jan 24 '19 at 06:39
  • No, you can use pinning (apt preferences). It is mentioned in both the linked posts. – Olorin Jan 24 '19 at 06:48

0 Answers0