The current method of changing the priority of repositories is to add an option in dnf.conf. It would be convenient for dnf to have built-in priority management functionality, similar to what's done in zypper with zypper modifyrepo --priority <number> <repo> Setting priorities is particularly useful to define default behavior for updates so there's generally no need for --enablerepo and --disablerepo.
For a temporary override you can use --setopt so for example: dnf install htop --setopt=rawhide.priority=40 (sets priority 40 for the rawhide repository) But this looks more like you want a permanent modification to the config file, we have a config-manager plugin for that. It is not the most convenient but you can do: dnf config-manager --setopt=rawhide.priority=40 --save (sets priority 40 for the rawhide repository in the repo file) Does that work for you?
This message is a reminder that Fedora Linux 34 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '34'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 34 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.