From 751212d5effdceab91d95705e647cf07e6820940 Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Thu, 22 Sep 2011 16:38:35 +0800 Subject: qemu-config: use pkg_postinst to generate the proper shutdown.desktop [YOCTO #1507] We need to remove the file qemuarm/shutdown.desktop, or else, on qemuarm, due to the PACKAGE_ARCH overriding from all to qemuarm in base.bbclass, the generated deb file will be stored at tmp/deploy/deb/qemuarm/qemu-config_1.0-r21_allarch.deb rather than tmp/deploy/deb/all/qemu-config_1.0-r21_all.deb, and the package qemu-config won't be installable -- task-base finally rdepends on qemu-config, so we get the do_rootfs failure: The following packages have unmet dependencies: | task-base-extended: Depends: task-base but it is not going to be installed | E: Broken packages There is also a generic shutdown.desktop, we can keep it and use a proper pkg_postinst to cope with the case of qemuarm. Signed-off-by: Dexuan Cui Signed-off-by: Richard Purdie --- meta/recipes-bsp/qemu-config/qemu-config.bb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'meta/recipes-bsp/qemu-config/qemu-config.bb') diff --git a/meta/recipes-bsp/qemu-config/qemu-config.bb b/meta/recipes-bsp/qemu-config/qemu-config.bb index 70a113e8d..ebf957a06 100644 --- a/meta/recipes-bsp/qemu-config/qemu-config.bb +++ b/meta/recipes-bsp/qemu-config/qemu-config.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemumips|qemuppc)" -PR = "r21" +PR = "r22" SRC_URI = "file://distcc.sh \ file://anjuta-remote-run \ @@ -32,6 +32,11 @@ do_install() { install qemu-autostart ${D}/etc/init.d/ } +pkg_postinst_${PN} () { + grep -q qemuarm $D${sysconfdir}/hostname && \ + sed -i $D${datadir}/applications/shutdown.desktop -e 's/^Exec=halt/Exec=reboot/' +} + RDEPENDS_${PN} = "distcc dbus-x11 task-core-nfs-server oprofileui-server rsync bash" inherit update-rc.d allarch -- cgit v1.2.3