Bug 1265618

Summary: priorities does not work for kernel packages
Product: [Fedora] Fedora Reporter: Daniel Piddock <dgp-bz>
Component: dnfAssignee: rpm-software-management
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 22CC: jsilhan, jzeleny, mlb, mluscon, packaging-team-maint, pnemade, tim.lauridsen, vmukhame
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 19:18:55 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 Daniel Piddock 2015-09-23 11:10:54 UTC
Description of problem:
We have locally maintained kernel modules (based on RPMFusion's kmods) that we need to build before our users upgrade their systems to avoid upset.

With yum-plugin-priorities we set a "local" repo as priority=10 and left the Fedora updates repo at default (99 according to docs). New kernels would not be automatically upgraded until added to "local".

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

How reproducible:
Consistently.

Steps to Reproduce:
1. Create a local repo. Add it to yum.repos.d with priority=10
2. Add old set of kernel packages to local repo
3. Force downgrade an install to the old kernel
4. Run "dnf upgrade"

Actual results:
dnf wants to install kernel, kernel-core, kernel-debug-core, kernel-debug-modules, kernel-debug-modules-extra and kernel-modules. 
kernel-devel and kernel-headers are being skipped due to "broken dependencies"

Expected results:
New kernel is not offered to be installed.

Additional info:
This is a regression from yum-plugin-priorities. This setup worked under F20.

Comment 1 Honza Silhan 2015-09-30 09:17:25 UTC
Thats how it should work according to DNF manual. Priority just set priority of the package so the repos could be prefered over another but it will not disable the rest of the repositories. You probably want to disable all other repositories rather than set priorities.

Comment 2 Daniel Piddock 2015-09-30 10:12:55 UTC
I'm not sure we understand each other. I do not want the rest of the repository to be disabled. I want certain packages in a local repository to override those in the much larger Fedora release/updates repositories.

The dnf.conf manual says:
"priority: 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)"

It sounds like you're describing "cost".

Take a working example:
- X-1.0.rpm exists in my local repository.
- X-2.0.rpm exists in Fedora repository.
- local repository has a priority of 10
- Fedora has default priority of 99.
- On "dnf upgrade" dnf informs me that X-2.0 has broken dependencies and won't be installed.

However with installonlypkgs e.g. kernel, priority gets ignored and the highest versioned package is always installed. This is a regression from yum-plugin-priorities.

Comment 3 Honza Silhan 2015-10-02 09:41:08 UTC
Ok, we will take a look. Your use case has many ways to be fixed. In the meantime exclude kernel* packages from Fedora repos or use version lock, please.

Comment 4 Fedora Admin XMLRPC Client 2016-07-08 09:33:39 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 5 Fedora End Of Life 2016-07-19 19:18:55 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.