]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel.bbclass: Correct post(inst|rm) package association
authorDarren Hart <dvhart@linux.intel.com>
Fri, 9 Aug 2013 17:58:42 +0000 (10:58 -0700)
committerPaul Eggleton <paul.eggleton@linux.intel.com>
Thu, 10 Oct 2013 11:21:01 +0000 (12:21 +0100)
Fixes [YOCTO #4991]

The kernel image is installed as part of the kernel-image package, but
the symlink creation/removal via alternatives is being done in
pkg_post(inst|rm)_kernel-base.

Move the postinst alternatives logic into the kernel-image functions.

(From OE-Core rev: 35f538b117e3387354d2dab1f22c3de28ab1322b)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/kernel.bbclass

index 33207470cff7bb5076a8a862d062342bc2d5595f..c417038cca369c00ce4146272120a4422fc6533a 100644 (file)
@@ -237,14 +237,6 @@ do_savedefconfig() {
 do_savedefconfig[nostamp] = "1"
 addtask savedefconfig after do_configure
 
-pkg_postinst_kernel-base () {
-       update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
-}
-
-pkg_postrm_kernel-base () {
-       update-alternatives --remove ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} || true
-}
-
 inherit cml1
 
 EXPORT_FUNCTIONS do_compile do_install do_configure
@@ -272,14 +264,19 @@ ALLOW_EMPTY_kernel-modules = "1"
 DESCRIPTION_kernel-modules = "Kernel modules meta package"
 
 pkg_postinst_kernel-image () {
-if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then
-       mkdir -p $D/lib/modules/${KERNEL_VERSION}
-fi
-if [ -n "$D" ]; then
-       depmodwrapper -a -b $D ${KERNEL_VERSION}
-else
-       depmod -a ${KERNEL_VERSION}
-fi
+       update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
+       if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then
+               mkdir -p $D/lib/modules/${KERNEL_VERSION}
+       fi
+       if [ -n "$D" ]; then
+               depmodwrapper -a -b $D ${KERNEL_VERSION}
+       else
+               depmod -a ${KERNEL_VERSION}
+       fi
+}
+
+pkg_postrm_kernel-image () {
+       update-alternatives --remove ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} || true
 }
 
 PACKAGESPLITFUNCS_prepend = "split_kernel_packages "