[oe-commits] Holger Hans Peter Freyther : kernel.bbclass: Do not chdir to / boot before running update-alternatives

git at git.openembedded.org git at git.openembedded.org
Mon Oct 22 13:58:13 UTC 2012


Module: openembedded-core.git
Branch: master-next
Commit: c77ca9ee901468c93570b5264b226f7d17a41c16
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=c77ca9ee901468c93570b5264b226f7d17a41c16

Author: Holger Hans Peter Freyther <holger at moiji-mobile.com>
Date:   Fri Oct 12 20:01:16 2012 +0200

kernel.bbclass: Do not chdir to /boot before running update-alternatives

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 at linuxfoundation.org>

---

 meta/classes/kernel.bbclass |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index a47fe93..8e13662 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -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





More information about the Openembedded-commits mailing list