summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta/classes/rootfs_deb.bbclass7
-rw-r--r--meta/classes/rootfs_ipk.bbclass2
-rw-r--r--meta/classes/rootfs_rpm.bbclass9
3 files changed, 17 insertions, 1 deletions
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
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 5c962de11b..0e2fa12ac9 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -83,7 +83,7 @@ fakeroot rootfs_ipk_do_rootfs () {
if ${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "true", "false" ,d)}; then
if grep Status:.install.ok.unpacked ${STATUS}; then
- echo "Some packages could not be configured offline and rootfs is read-only."
+ bberror "Some packages could not be configured offline and rootfs is read-only."
exit 1
fi
fi
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 2bfd1b779e..7d789cc8fd 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -87,6 +87,15 @@ fakeroot rootfs_rpm_do_rootfs () {
${ROOTFS_POSTINSTALL_COMMAND}
+ if ${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "true", "false" ,d)}; then
+ if [ -d ${IMAGE_ROOTFS}/etc/rpm-postinsts ] ; then
+ if [ "`ls -A ${IMAGE_ROOTFS}/etc/rpm-postinsts`" != "" ] ; then
+ bberror "Some packages could not be configured offline and rootfs is read-only."
+ exit 1
+ fi
+ fi
+ fi
+
# Report delayed package scriptlets
for i in ${IMAGE_ROOTFS}/etc/rpm-postinsts/*; do
if [ -f $i ]; then