Bug 1047041 - problem resolving 'kernel-devel-uname-r' as a dependency
problem resolving 'kernel-devel-uname-r' as a dependency
Status: CLOSED DUPLICATE of bug 1228897
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
20
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-28 12:10 EST by Branko Grubić
Modified: 2016-04-03 20:23 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-07 09:43:24 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
yum install akmod-nvidia -v (110.25 KB, text/plain)
2013-12-28 12:10 EST, Branko Grubić
no flags Details

  None (edit)
Description Branko Grubić 2013-12-28 12:10:55 EST
Created attachment 842694 [details]
yum install akmod-nvidia -v

Description of problem:
When using rpmfusion repo, and installink 'akmod-nvidia' package, 'akmods' package requires 'kernel-devel-uname-r', and instead of kernel-devel-$(uname -r) it gets 'kernel-debug-devel-3.12.5-302.fc20.x86_64' (kernel-debug-devel-$(uname -r)) << This is just an example, I'll include part of the log from 'yum install akmood-nvidia -v' 


Version-Release number of selected component (if applicable):
yum-3.4.3-128.fc20.noarch

How reproducible:


Steps to Reproduce:
1. 
2.
3.

Actual results:
Instead of 'kernel-devel-$(uname -r)' yum installs 'kernel-debug-devel-$(uname -r)'

Expected results:
yum installs required package

Additional info:
Comment 1 Jan Zeleny 2014-01-02 03:32:24 EST
This is not a bug in yum, it just does what it's told to do by package requirement lists. In this case the culprit is clearly the akmods package, see repoquery --requires akmods. Also, judging from the fact that there are actually some packages providing the dependency, the behavior might be intentional - maintainer of the akmods package might know some details.


In any case, I'm closing the bug.
Comment 2 Nicolas Chauvet (kwizart) 2014-01-04 08:25:27 EST
Hi Jan,
Thx for responding.

Akmods current maintainer speaking.
I confirm the behavior has changed between f19 and f20, and I feel the problem is in the yum virtual dependency resolution step. (Nothing has changed from the akmods POV).

akmods has "Requires: kernel-devel-uname-r". The intend is (despite the name) not to hardcode the require to one or another kernel-devel "varriant" (PAE/smp/lpae/whatever) and not the kernel-devel matching the running kernel. (despite that would be the final goal).

It's still imperfect and can be improved but at least worked fine on default kernel.x86_64 because the kernel-devel "shortest name" should win over other more unusual variant.
That's the only reason why I expect to have more weight against kernel-devel, because the later doesn't has a dependency on the (installed) kernel itslef given that it's possible to cross-compile for another kernel variant.


Given the current problem description, I expect the above change to have implication with others packages using virtual dependencies.
Comment 3 Jan Zeleny 2014-01-06 02:38:34 EST
Nicolas, thank you for more details on this. I must say I'm a bit confused what exactly is the problem but then again I'm not a yum developer. Setting needinfo to James, perhaps he'll know what's going on.
Comment 4 James Antill 2014-01-07 09:43:24 EST
> It's still imperfect and can be improved but at least worked fine on default kernel.x86_64 because the kernel-devel "shortest name" should win over other more unusual variant.

Shortest name is far from the only thing we look at when comparing providers, see:

http://yum.baseurl.org/wiki/CompareProviders

...specifically I assume you are hitting #10 where yum will compare the provide versions of "3.12.5-302.fc20.x86_64" and "3.12.5-302.fc20.x86_64+debug", and so decide the later is newer and prefer to install that.
Comment 5 Thorsten Leemhuis 2014-01-07 16:15:43 EST
That "Requires: kernel-devel-uname-r" in kernel.spec was a stupid hack anyway, just to make sure we get the default kernel-devel if none is installed. Sigh, I wish the default kernel had some tag as well, that would make a lot of things easier. 

@bitlord, @kwizart: you might want to change the requires in akmod.spec to "Requires: kernel-devel(%{__isa})" (untested, but should do what yum did previously afaics)
Comment 6 Richard Shaw 2015-04-11 12:55:37 EDT
I don't think this bug should be closed, I noticed on a fresh install of F21 when I installed the "Development Tools" group that kernel-debug-devel was installed instead of kernel-devel which I'm guessing is not the intended default behavior. 

# dnf --installroot ~/tmp --releasever 21 group install "Development Tools" --setopt=tsflags=nocontexts --nogpgcheck
Using metadata from Sat Apr 11 11:49:46 2015
Dependencies resolved.
================================================================================
 Group                     Packages                                            
================================================================================
Marking installed:
 Development Tools         gitg             dejagnu                 quilt      
                           diffstat         bzr-explorer            cvs2cl     
                           svn2cl           utrac                   nemiver    
                           expect           translate-toolkit       buildbot   
                           qgit             gtranslator             git        
                           scanmem          tig                     gettext    
                           rcs              subversion              robodoc    
                           patchutils       manedit                 rapidsvn   
                           subunit          cvsgraph                systemtap  
                           monotone         archmage                tailor     
                           cvsps            tkcvs                   tortoisehg 
                           giggle           darcs                   doxygen    
                           bzr              git-cola                gambas3-ide
                           mercurial        cvs                     git-annex  
                           meld             mr                      highlight  
                           lcov             colordiff               git2cl     
================================================================================
 Package                  Arch     Version                      Repository
                                                                           Size
================================================================================
Installing:
[SNIP]
 kernel-debug-devel       x86_64   3.19.3-200.fc21              updates   9.4 M
 kernel-headers           x86_64   3.19.3-200.fc21              updates   974 k
[SNIP]
Comment 7 Richard Shaw 2015-04-11 13:17:09 EDT
(In reply to Thorsten Leemhuis from comment #5)
> That "Requires: kernel-devel-uname-r" in kernel.spec was a stupid hack
> anyway, just to make sure we get the default kernel-devel if none is
> installed. Sigh, I wish the default kernel had some tag as well, that would
> make a lot of things easier. 
> 
> @bitlord, @kwizart: you might want to change the requires in akmod.spec to
> "Requires: kernel-devel(%{__isa})" (untested, but should do what yum did
> previously afaics)

That pretty much got it. Turns out %{_isa} (one underscore) adds the () for you. Just tested installing in mock for both i686 and x86_64.
Comment 8 Sergio Monteiro Basto 2016-04-03 20:23:15 EDT

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

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