I'm guessing that #1 will be picked as the source repo for the package because archlinuxcn is listed higher up in my /etc/pacman.conf than condresrepo. Is my assumption correct? If not, how do the standard package-managers pacman/yay/yaourt/etc choose which repo to use when installing a package contained within more than one?
Since neither yay nor yaourt are standard at all, I don't understand your question.
As V1del said, pacman documents exactly how it chooses which package to choose -- but since google-chrome-dev != google-chrome (it merely provides it) you will never get offered this regardless of which repo comes first. Provides are only used for pacman -S, when there is not an exact pkgname match...
Whyever and however the yay/yaourt selection algorithms work is a question best asked of the yay/yaourt developers. I assume and hope that -Syu is modeled to respect how pacman itself operates. pacman does not have any option to not specify any options, so it seems yay has modeled your example after yaourt and introduced a mode of operation entirely foreign to pacman entirely.
]]>For what reason did you add all those repos?
At the moment curiosity in the "Unofficial Repos" vs the AUR. Sometimes I found that packages found in the AUR wouldn't work properly but did from another repo.
]]>...
The order of repositories in the configuration files matters; repositories listed first will take precedence over those listed later in the file when packages in two repositories
have identical names, regardless of version number.
...
Also there is only one standard package manager, and repository packages will in the end always be installed by pacman, whichever helper frontend you use here shouldn't factor in for repository packages.
]]>I'm teaching myself the more advanced aspects of Arch and have though of a question regarding sofrware packages. I have attempted to find the answer myself but I keep running into keyword problems describing my question.
I'd like to know the following:
When a package is available on two or more repos, how does Arch choose which repo to use by defaults? Here's an example using 'yay' to search for 'google-chrome' with the repos archlinuxcn and condresrepo enabled.
$ yay google-chrome
3 condresrepo/google-chrome 71.0.3578.98-1 (55.4 MiB 193.0 MiB)
The popular and trusted web browser by Google (Stable Channel)
2 archlinuxcn/google-chrome-dev 73.0.3679.0-1 (57.4 MiB 199.0 MiB)
The popular and trusted web browser by Google (Dev Channel)
1 archlinuxcn/google-chrome 71.0.3578.98-1 (55.5 MiB 192.9 MiB)
The popular and trusted web browser by Google (Stable Channel)
==> Packages to install (eg: 1 2 3, 1-3 or ^4)
==>
This is obviously a command that asks me to make a choice but when installing the same package with 'yay -S google-chrome' the package manager does the selection for me.
Since I don't want to use the deveolpment version, #1 and #3 are the only ones I care about. I'm guessing that #1 will be picked as the source repo for the package because archlinuxcn is listed higher up in my /etc/pacman.conf than condresrepo. Is my assumption correct? If not, how do the standard package-managers pacman/yay/yaourt/etc choose which repo to use when installing a package contained within more than one?
I can't say I've ever run into a problem regarding which repo a certain package is coming from, I'm simply curious about how this works as I'm trying to become more proficient with Arch altogether.
Thanks!
]]>