]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel.bbclass: Do not chdir to /boot before running update-alternatives
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>
Fri, 12 Oct 2012 18:01:16 +0000 (20:01 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 22 Oct 2012 13:57:26 +0000 (14:57 +0100)
The symlink from uImage-3... to uImage is not created at image creation
time and not properly update on kernel upgrades. This is fixed by removing
the chdir. The other users of update-alternative do not change the directory
before calling it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/kernel.bbclass

index a47fe93cb7f680da99ec31d0db595042b4b4bc54..8e13662382df48169bb7175e6f97bec339cd56fd 100644 (file)
@@ -244,11 +244,11 @@ do_savedefconfig[nostamp] = "1"
 addtask savedefconfig after do_configure
 
 pkg_postinst_kernel-base () {
-       cd /${KERNEL_IMAGEDEST}; update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
+       update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
 }
 
 pkg_postrm_kernel-base () {
-       cd /${KERNEL_IMAGEDEST}; update-alternatives --remove ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} || true
+       update-alternatives --remove ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} || true
 }
 
 inherit cml1