Bug 1243007

Summary: dnf check-update ignores repo priority
Product: [Fedora] Fedora Reporter: Ion Badulescu <ionut>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 22CC: ionut, jsilhan, mluscon, packaging-team-maint, pnemade, rholy, tim.lauridsen, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-29 14:33:22 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 Ion Badulescu 2015-07-14 14:37:59 UTC
Description of problem:
I have a local repo with a few modified packages and high priority in the repo definition file. yum handles it properly for both update and check-update, but dnf only handles it properly for update. When running dnf check-update, it shows a bunch of rpms that need to be updated (because it ignores the repo priorities), and then does nothing when running dnf update (because it honors the repo priorities). That's very confusing, to say the least.

Version-Release number of selected component (if applicable):
dnf-1.0.1-2.fc22.noarch


How reproducible:
100%

Steps to Reproduce:
1. add a local repo with a few old versions of the standard rpms and priority=1
2. on a test system, force-downgrade those rpms to the old versions in the local repo
3. run dnf check-update

Actual results:
When running dnf check-update:
# dnf check-update
Last metadata expiration check performed 0:22:19 ago on Tue Jul 14 10:05:36 2015.

bash.x86_64                                  4.3.39-3.fc22               updates
mate-terminal.x86_64                         1.10.0-2.fc22               updates
wpa_supplicant.x86_64                        1:2.4-3.fc22                updates
xorg-x11-server-Xephyr.x86_64                1.17.2-1.fc22               updates
xorg-x11-server-Xnest.x86_64                 1.17.2-1.fc22               updates
xorg-x11-server-Xorg.x86_64                  1.17.2-1.fc22               updates
xorg-x11-server-Xvfb.x86_64                  1.17.2-1.fc22               updates
xorg-x11-server-Xwayland.x86_64              1.17.2-1.fc22               updates
xorg-x11-server-common.x86_64                1.17.2-1.fc22               updates
xorg-x11-server-devel.x86_64                 1.17.2-1.fc22               updates

When running dnf update:
# dnf update
Last metadata expiration check performed 0:22:24 ago on Tue Jul 14 10:05:36 2015.
Dependencies resolved.
Nothing to do.
Complete!


Expected results:
dnf check-update should show "Nothing to do", same as dnf update.

Additional info:

Comment 1 Honza Silhan 2015-07-16 13:55:15 UTC
Thanks for the report. DNF check-update is not supposed to be the same `update --assumeno`.

check-update: which package has an available upgrade (sometimes all could be installed or could be installed separately only or installed when you force the removal of another installed package - --allowerasing switch.

Can you post output of these commands, please:
# dnf update --best --allowerasing --assumeno
# dnf update bash-4.3.39-3.fc22.x86_64 --assumeno

Comment 2 Ion Badulescu 2015-07-16 14:31:12 UTC
I'd argue that it's needlessly confusing to have check-update show updates that will never get installed by update unless I manually disable some repos. If I wanted that kind of output, I'd disable those repos for the check-update command (and that's exactly what I used to do with yum).

Anyway:

# dnf update --best --allowerasing --assumeno
Last metadata expiration check performed 0:00:32 ago on Thu Jul 16 10:23:21 2015.
Dependencies resolved.
Nothing to do.
Complete!

# dnf update bash-4.3.39-3.fc22.x86_64 --assumeno
Last metadata expiration check performed 0:00:28 ago on Thu Jul 16 10:23:21 2015.
No match for argument: bash-4.3.39-3.fc22.x86_64
Error: No packages marked for upgrade.

I guess that's not quite what you wanted to see, right? Here's the output for bash with no version specifier:

# dnf update bash --assumeno
Last metadata expiration check performed 0:03:20 ago on Thu Jul 16 10:23:21 2015.
Dependencies resolved.
Nothing to do.
Complete!

Comment 3 Honza Silhan 2015-07-29 14:33:22 UTC

*** This bug has been marked as a duplicate of bug 1210445 ***