summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Hart <dvhart@linux.intel.com>2013-08-09 10:58:42 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-10 12:31:14 +0100
commit7f1a354944e08cb5a9413bb376951499e3a5ec6b (patch)
tree8d140a6fed05b2603658ebf54edc4ff5db5228e7
parent8bc57089451b6e8da9c5623983ed59dbf6ae0db1 (diff)
downloadpoky-7f1a354944e08cb5a9413bb376951499e3a5ec6b.tar.gz
kernel.bbclass: Correct post(inst|rm) package association
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) (From OE-Core rev: d5478e188561c2fee788ee326e3f7cdea7cf5a24) 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>
-rw-r--r--meta/classes/kernel.bbclass29
1 files changed, 13 insertions, 16 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 33207470cf..c417038cca 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -237,14 +237,6 @@ do_savedefconfig() {
237do_savedefconfig[nostamp] = "1" 237do_savedefconfig[nostamp] = "1"
238addtask savedefconfig after do_configure 238addtask savedefconfig after do_configure
239 239
240pkg_postinst_kernel-base () {
241 update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
242}
243
244pkg_postrm_kernel-base () {
245 update-alternatives --remove ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} || true
246}
247
248inherit cml1 240inherit cml1
249 241
250EXPORT_FUNCTIONS do_compile do_install do_configure 242EXPORT_FUNCTIONS do_compile do_install do_configure
@@ -272,14 +264,19 @@ ALLOW_EMPTY_kernel-modules = "1"
272DESCRIPTION_kernel-modules = "Kernel modules meta package" 264DESCRIPTION_kernel-modules = "Kernel modules meta package"
273 265
274pkg_postinst_kernel-image () { 266pkg_postinst_kernel-image () {
275if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then 267 update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
276 mkdir -p $D/lib/modules/${KERNEL_VERSION} 268 if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then
277fi 269 mkdir -p $D/lib/modules/${KERNEL_VERSION}
278if [ -n "$D" ]; then 270 fi
279 depmodwrapper -a -b $D ${KERNEL_VERSION} 271 if [ -n "$D" ]; then
280else 272 depmodwrapper -a -b $D ${KERNEL_VERSION}
281 depmod -a ${KERNEL_VERSION} 273 else
282fi 274 depmod -a ${KERNEL_VERSION}
275 fi
276}
277
278pkg_postrm_kernel-image () {
279 update-alternatives --remove ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} || true
283} 280}
284 281
285PACKAGESPLITFUNCS_prepend = "split_kernel_packages " 282PACKAGESPLITFUNCS_prepend = "split_kernel_packages "