Repo and mirro questions

Hello everyone

if i enabled some repo what dnf will behave on the following case

  1. if the same packaged exist in 2 or more repo which one get higher priority and it will install the package form and how to control that

  2. does the repo that i installed this package from has effect for first point in the updating case so

    a) does updating will happen from the same repo i installed the package from even if there higher priority repo

    b) if that repo i installed from is not available will the update check other repo and update from other repo or not

    c) can i control that certain package get updated from only certain repo

now some question for the mirror

  1. is there away to check what are the mirror available even if the mirror list is not available by the author on their website

  2. can i have control on those mirror so for example block one or some of them (other than block it by the firewall)

thanks for your time and have a nice day :slight_smile:

Once you install non-standard repos, all kinds of horrible things can happen, including not being correctly patched for security. You could however, carefully check the specific dependencies of the package that you’re interested in, and decide if it’s completely stand alone or if it will clash. In addition to this, check the licensing and make sure everything you install is 100% open source.

You need to look at the man pages for dnf.conf

and the files in /etc/yum.repos.d - links in there will list mirrors but you can change the links etc.

the variables used in those files are typically taken from files in /etc/dnf/vars of the same name so for instance echo '8.5' > /etc/dnf/vars/releasever would override the default value for $releasever (adding entries in /etc/dnf/dnf.conf doesn’t seem to have an effect) - view the current values with
dnf config-manager --dump-variables

Also see rpm and dnf man pages for dependency info.

It all a bit all-over-the-place.

thanks @gerry666uk and i totally agree i just wanted to know on how things work

thanks @bobar will dive into those thanks for the hints

and have a nice day both of you :slight_smile:

For 1, I don’t think that there is any priority by default. The Yum had priority plugin, but I can’t say whether that was reliable nor is it there for dnf. Some plugins might protect the base repos. The preferred approach is to not use (multiple) repos that provide “same features”.

For 2, again, source repo of currently installed package is not used.
However, 2c, you can add exclude=xyz* into section of a repo in order to exclude “xyz*” packages from that repo.

thanks a lot @jlehtone for the info and have a nice day :slight_smile: