Bug 5392

Summary: Missing dependency for kernel-image-* package
Product: [Runtime] Package Management Issues Reporter: David Nyström <david.nystrom>
Component: package-management-issuesAssignee: Paul Eggleton <bluelightning>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: david.nystrom, dvhart, poky.bs.watcher, poky.watcher, sgw
Version: unspecified   
Target Milestone: 1.5.1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description David Nyström 2013-10-28 12:10:03 UTC
kernel-image-* cant find /lib/modules/3.8.11-yocto-standard/modules.*, 
which are included from a different package, but lacks this dependency.


sh-4.2# smart install kernel-image-3.8.11-yocto-standard
Loading cache...
Updating cache...                                                            ############################################################################################################# [100%]

Computing transaction...

Installing packages (1):
  kernel-image-3.8.11-yocto-standard-3.8.11+git0+8482dcdf68f9f7501118f4c01fdcb8f851882997_dd089cb5ba37ea14e8f90a884bf2a5be64ed817d-r4.1@qemux86_64                                                

4.8MB of package files are needed. 4.9MB will be used.

Confirm changes? (Y/n): Y

Fetching packages...                                                                                                                                                                             
-> http://downloads.yoctoproject.org/.../kernel-image-3.8.11-yocto-standard-3.8.11+git0+8482dcdf68f9f7501118f4c01fdcb8f851882997_dd089cb5ba37ea14e8f90a884bf2a5be64ed817d-r4.1.qemux86_64.rpm    
kernel-image-3.8.11-yocto-standard-3.8.11+git0+8482dcdf68f9f7501118f4c01fd.. ############################################################################################################# [100%]

                                                                                                                                                                                                 
Committing transaction...
Preparing...                                                                 ############################################################################################################# [  0%]
   1:Installing kernel-image-3.8.11-yocto-standard                           ############################################################################################################# [100%]
Output from kernel-image-3.8.11-yocto-standard-3.8.11+git0+8482dcdf68f9f7501118f4c01fdcb8f851882997_dd089cb5ba37ea14e8f90a884bf2a5be64ed817d-r4.1@qemux86_64:
WARNING: could not open /tmp/rootfs/lib/modules/3.8.11-yocto-standard/modules.order: No such file or directory
WARNING: could not open /tmp/rootfs/lib/modules/3.8.11-yocto-standard/modules.builtin: No such file or directory
Comment 1 Paul Eggleton 2014-02-24 11:43:00 UTC
Darren, it looks like you moved the postinstall scripts from kernel-base to kernel-image in the following commit:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=7590f6926de6dcee05a5b71ef61b8a09972daac5

Files required by depmod however remain in kernel-base. Should we simply add a dependency from kernel-image on kernel-base?
Comment 2 Paul Eggleton 2014-02-24 11:46:44 UTC
(Note: since the aforementioned fix was backported to dylan, this also affects that branch as well).
Comment 3 Darren Hart 2014-03-06 17:54:40 UTC
Well now, talk about a crappy commit message and poor description in the previous bug. Bad Darren. It looks as though our kernel-* packaging breakdown doesn't really match what's needed in practice and we're seeing the fallout of that. This is not something I've examined carefully myself. It looks like this needs a careful audit and update... all the way back to dylan.
Comment 4 Darren Hart 2014-03-17 16:07:35 UTC
We can't add the RDEPENDS as there is a default RDEPENDS in the opposite direction in kernel.bbclass, so we'd end up with a circular dependency by default. Nasty.

It is possible we could just move some of the post-inst back, keeping it split across kernel-image and kernel-base.

Something like this is probably the best approach for the 1.6 time frame. I'll open another bug for a serious revamp/refactoring of kernel.bbclass for the 1.7 cycle.
Comment 6 Paul Eggleton 2014-04-07 09:52:07 UTC
I've also backported and sent the patch for the dora branch, just waiting for it to be merged.
Comment 7 Paul Eggleton 2014-04-11 12:40:23 UTC
In master there was a follow-up fix for this to avoid signature corruption as a result of the fix for this bug when testimage.bbclass is in use:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=b8584fe5c68c004c5e53e5f0a559886adac386ae

The bug is now fixed in dora as well:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=dora&id=337de046c8144b2fbcd7799a11828dc3eb34b839

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=dora&id=b96f0217e408700e4b0ce270d3b0322b5d5a9863

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=dora&id=e5cb267922d146ab1972de7c183982c7cc312e46

Marking as resolved. At this time I think I won't backport this to dylan unless someone requests it - please do so if you need it.