From 8ca0d592c5c266741ea00bc2629ef031506f834e Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Wed, 16 Jan 2013 18:09:27 +0000 Subject: classes/rootfs_*: error out if postinstalls exist with read-only rootfs If there are postinstall scripts to be run on first boot and IMAGE_FEATURES contains "read-only-rootfs", we know this will fail on the target device so just error out during do_rootfs. This check was already implemented for ipk, so add it to the deb and rpm backends. Also make all backends use bberror rather than just echo to display the error. Fixes [YOCTO #3407]. (From OE-Core rev: 510e377f252dece8850487c30482f83df4a89c7e) Signed-off-by: Paul Eggleton Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- meta/classes/rootfs_deb.bbclass | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'meta/classes/rootfs_deb.bbclass') diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass index 293953df3e..99979961ea 100644 --- a/meta/classes/rootfs_deb.bbclass +++ b/meta/classes/rootfs_deb.bbclass @@ -70,6 +70,13 @@ fakeroot rootfs_deb_do_rootfs () { set -e + if ${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "true", "false" ,d)}; then + if grep Status:.install.ok.unpacked ${IMAGE_ROOTFS}/var/lib/dpkg/status; then + bberror "Some packages could not be configured offline and rootfs is read-only." + exit 1 + fi + fi + install -d ${IMAGE_ROOTFS}/${sysconfdir} echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version -- cgit v1.2.3-54-g00ecf