From patchwork Fri Oct 12 18:01:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: kernel.bbclass: Do not chdir to /boot before running update-alternatives Date: Fri, 12 Oct 2012 18:01:16 -0000 From: Holger Hans Peter Freyther X-Patchwork-Id: 38129 Message-Id: <1350064876-11475-1-git-send-email-holger@moiji-mobile.com> To: openembedded-core@lists.openembedded.org Cc: Holger Hans Peter Freyther 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. --- meta/classes/kernel.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 36bc3c7..28b1e3e 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass @@ -245,11 +245,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