Bug 1470050

Summary: the 'priority=' option in /etc/yum.repos.d/*.repo is not respected
Product: [Fedora] Fedora Reporter: Pavel Raiskup <praiskup>
Component: dnfAssignee: Igor Gnatenko <ignatenko>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 26CC: packaging-team-maint, pavel.starek, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Reopened, Triaged, UserExperience
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-2.6.3-11.fc26 dnf-2.6.3-11.fc27 dnf-2.7.2-1.fc27 dnf-2.7.2-1.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-04 14:23:36 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:
Attachments:
Description Flags
base.repo
none
debugdata, as requsted by Igor on #fedora-devel none

Description Pavel Raiskup 2017-07-12 10:52:03 UTC
Created attachment 1296862 [details]
base.repo

According to `man dnf.conf`:
    priority
          integer

          The priority value of this repository, default is 99.  If  there is
          more  than one candidate package for a particular operation, the one
          from a repo with the lowest priority  value  is  picked, possibly
          despite being less convenient otherwise (e.g. by being a lower
          version).

Reproducer:

[root@dev-copr ~]# dnf repolist

    Last metadata expiration check: 0:01:55 ago on Wed 12 Jul 2017 10:46:00 AM
    repo id                              repo name                       status
    *fedora                              Fedora 26 - x86_64              53,912
    rhcopr-development-repository-fedora Copr repo for rhcopr-dev owned      12
    rhcopr-repository-fedora             Copr repo for rhcopr owned by p      2
    *updates                             Fedora 26 - x86_64 - Updates     1,792
    [root@dev-copr ~]# dnf repoquery -q copr-frontend
    copr-frontend-0:1.107-1.fc26.noarch
    copr-frontend-0:1.110.rhcopr-1.fc26.noarch
    copr-frontend-0:1.110.rhcopr-1.fc26.src
    copr-frontend-0:1.113-1.fc26.noarch
    [root@dev-copr ~]# dnf install copr-frontend
    Last metadata expiration check: 0:00:13 ago on Wed 12 Jul 2017 10:48:12 AM
    Dependencies resolved.
    ===========================================================================
     Package                             Arch   Version          Repository
                                                                          Size
    ===========================================================================
    Installing:
     copr-frontend                       noarch 1.113-1.fc26     updates 3.2 M
    Installing dependencies:
     PyYAML                              x86_64 3.12-3.fc26      fedora  178
    ....

So dnf tries to install copr-frontend from 'updates', instead of installing that
package from 'rhcopr-repository-fedora' or
'rhcopr-development-repository-fedora' repositories (having priority=50).  See
the base.repo file attached.

This worked fine some time ago on F25.

Comment 1 Pavel Raiskup 2017-07-12 11:08:22 UTC
Created attachment 1296864 [details]
debugdata, as requsted by Igor on #fedora-devel

Comment 2 Igor Gnatenko 2017-07-12 11:27:20 UTC
Sounds like a real bug.

Comment 3 Pavel Stárek (CZ) 2017-08-19 17:48:43 UTC
Hi all,

I can confirm this bug. I have configured repos from Russian Fedora (RFremix) project, and I have their "fixes" repository set up to lowest priority (repo priority value set to 200 because I don't want replace original Fedora pkgs with pkgs from this repo), in my other repos I have set priority value to 20 and fedora-updates repo I have set to value 10 (this is the highest priority), but freetype package from RFremix Fixes is selected to update, which is not correct according to my priorities settings.

Comment 5 Fedora Update System 2017-09-13 17:12:23 UTC
dnf-2.6.3-11.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-f2f4fe090e

Comment 6 Fedora Update System 2017-09-13 17:12:37 UTC
dnf-2.6.3-11.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-9fe37c9984

Comment 7 Fedora Update System 2017-09-13 19:24:57 UTC
dnf-2.6.3-11.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-f2f4fe090e

Comment 8 Fedora Update System 2017-09-14 04:53:12 UTC
dnf-2.6.3-11.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-9fe37c9984

Comment 9 Fedora Update System 2017-09-14 21:55:14 UTC
dnf-2.6.3-11.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2017-09-30 06:27:48 UTC
dnf-2.6.3-11.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2017-10-02 10:34:42 UTC
dnf-plugins-extras-2.0.3-1.fc27 dnf-plugins-core-2.1.4-1.fc27 dnf-2.7.2-1.fc27 libdnf-0.10.1-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-faf235c683

Comment 12 Fedora Update System 2017-10-02 10:38:02 UTC
dnf-plugins-extras-2.0.3-1.fc26 dnf-plugins-core-2.1.4-1.fc26 dnf-2.7.2-1.fc26 libdnf-0.10.1-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-70a8618065

Comment 13 Fedora Update System 2017-10-02 20:28:43 UTC
dnf-2.7.2-1.fc26, dnf-plugins-core-2.1.4-1.fc26, dnf-plugins-extras-2.0.3-1.fc26, libdnf-0.10.1-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-70a8618065

Comment 14 Fedora Update System 2017-10-02 21:27:57 UTC
dnf-2.7.2-1.fc27, dnf-plugins-core-2.1.4-1.fc27, dnf-plugins-extras-2.0.3-1.fc27, libdnf-0.10.1-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-faf235c683

Comment 15 Fedora Update System 2017-10-04 14:23:36 UTC
dnf-2.7.2-1.fc27, dnf-plugins-core-2.1.4-1.fc27, dnf-plugins-extras-2.0.3-1.fc27, libdnf-0.10.1-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2017-10-04 22:25:39 UTC
dnf-2.7.2-1.fc26, dnf-plugins-core-2.1.4-1.fc26, dnf-plugins-extras-2.0.3-1.fc26, libdnf-0.10.1-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.