Bug 967798

Summary: [RFE] repositories costs
Product: [Fedora] Fedora Reporter: Matthias Runge <mrunge>
Component: dnfAssignee: Honza Silhan <jsilhan>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: low    
Version: rawhideCC: akozumpl, cristian.ciupitu, mls, mrunge, packaging-team-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-0.4.2-1.gitc1716d7.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-09 14:21:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matthias Runge 2013-05-28 11:07:10 UTC
Yum supports to set "costs" for a repository. It can be used to prioritize one repository over another. dnf doesn't seem to support this.

I have a local mirror of a remote repo, both consisting the same files, but my local repo has lower costs (than the remote) configured in the repo file and thus should be used instead of the remote (which dnf tried to use).

Comment 1 Ales Kozumplik 2013-05-29 07:31:42 UTC
Hi, did you consider disabling the remote repo?

This is the kind of feature that has little value but increases complexity all over the stack.

Comment 2 Matthias Runge 2013-05-29 11:15:50 UTC
I don't think it has little value. When you have a layered product, based on RHEL, you'll have an additional repository. There might be parts of that layered product also available on EPEL. Since you can not simply remove those parts from there, you still want to have your additional repository preferred. 

We have this situation eg. for OpenStack

When switching from yum to dnf, this will break.

Comment 3 Ales Kozumplik 2013-05-29 11:21:15 UTC
Let's keep it in the backlog then.

Comment 4 Michael Schröder 2013-06-03 10:02:19 UTC
FYI: libsolv supports something called "subpriorities" for that reason, so you probably just have to connect them with the repository costs.

Comment 5 Ales Kozumplik 2013-06-03 10:10:15 UTC
(In reply to Michael Schröder from comment #4)
> FYI: libsolv supports something called "subpriorities" for that reason, so
> you probably just have to connect them with the repository costs.

All right, very nice to hear. This gives this bug a lot better chances.

Comment 6 Cristian Ciupitu 2013-08-07 10:35:30 UTC
I'm having this issue on Fedora 19 too:
 - dnf-0.3.10-1.giteb9dddb.fc19.noarch.rpm
 - hawkey-0.3.16-2.git1e5a593.fc19.x86_64.rpm
 - libsolv-0.3.0-5.git228d412.fc19.x86_64.rpm

Comment 7 Honza Silhan 2013-09-30 13:14:43 UTC
fixed in 106fa375b74d4053b726a8b65001fdf9bb950fbe on master

Comment 8 Fedora Update System 2013-10-01 13:52:12 UTC
dnf-0.4.2-1.gitc1716d7.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/dnf-0.4.2-1.gitc1716d7.fc20

Comment 9 Fedora Update System 2013-10-02 06:49:36 UTC
Package dnf-0.4.2-1.gitc1716d7.fc20, librepo-1.2.0-1.fc20, hawkey-0.4.2-1.git4c51f65.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-0.4.2-1.gitc1716d7.fc20 librepo-1.2.0-1.fc20 hawkey-0.4.2-1.git4c51f65.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-18123/librepo-1.2.0-1.fc20,hawkey-0.4.2-1.git4c51f65.fc20,dnf-0.4.2-1.gitc1716d7.fc20
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2013-10-09 14:21:07 UTC
dnf-0.4.2-1.gitc1716d7.fc20, librepo-1.2.0-1.fc20, hawkey-0.4.2-1.git4c51f65.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.