Patchwork [1/3] classes/kernel: move module postinst commands to kernel-base

login
register
mail settings
Submitter Paul Eggleton
Date March 20, 2014, 3:15 p.m.
Message ID <ab237fe9780e3dd19b5583258f5996fa26de5b61.1395328478.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/68941/
State Accepted
Commit 9ce1f7d522aac19e0f88ae4f4066aee89c2ac678
Headers show

Comments

Paul Eggleton - March 20, 2014, 3:15 p.m.
Since kernel-base is the package that contains the files that depmod
needs to run, we should be running depmod from the kernel-base
postinstall rather than kernel-image.

Fixes [YOCTO #5392].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/kernel.bbclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Richard Purdie - March 21, 2014, 9:25 a.m.
On Thu, 2014-03-20 at 15:15 +0000, Paul Eggleton wrote:
> Since kernel-base is the package that contains the files that depmod
> needs to run, we should be running depmod from the kernel-base
> postinstall rather than kernel-image.
> 
> Fixes [YOCTO #5392].
> 
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
>  meta/classes/kernel.bbclass | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)

I think this might have triggered:

http://autobuilder.yoctoproject.org/main/builders/nightly-multilib/builds/105/steps/BuildImages_3/logs/stdio

Cheers,

Richard

Patch

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 6953109..19b159b 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -362,8 +362,7 @@  ALLOW_EMPTY_kernel-image = "1"
 ALLOW_EMPTY_kernel-modules = "1"
 DESCRIPTION_kernel-modules = "Kernel modules meta package"
 
-pkg_postinst_kernel-image () {
-	update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
+pkg_postinst_kernel-base () {
 	if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then
 		mkdir -p $D/lib/modules/${KERNEL_VERSION}
 	fi
@@ -374,6 +373,10 @@  pkg_postinst_kernel-image () {
 	fi
 }
 
+pkg_postinst_kernel-image () {
+	update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
+}
+
 pkg_postrm_kernel-image () {
 	update-alternatives --remove ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} || true
 }