Bug 1938338 - [rfe] Option to change repository priority from dnf
Summary: [rfe] Option to change repository priority from dnf
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 34
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: dnf-community
TreeView+ depends on / blocked
 
Reported: 2021-03-12 20:05 UTC by Thiago Sueto
Modified: 2022-05-16 04:47 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-16 04:47:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Thiago Sueto 2021-03-12 20:05:49 UTC
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.

Comment 1 amatej 2021-03-15 13:24:25 UTC
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?

Comment 2 Ben Cotton 2022-05-12 16:30:22 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.