aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/rootfs_rpm.bbclass
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-01-16 18:09:27 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-18 13:01:42 +0000
commit510e377f252dece8850487c30482f83df4a89c7e (patch)
tree0b7fd79384a83d6326b6a078e5e7afc150299ef2 /meta/classes/rootfs_rpm.bbclass
parentf6c7d5e0590e3e70fb435e747ffdb9fe586e7bfc (diff)
downloadopenembedded-core-510e377f252dece8850487c30482f83df4a89c7e.tar.gz
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]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes/rootfs_rpm.bbclass')
-rw-r--r--meta/classes/rootfs_rpm.bbclass9
1 files changed, 9 insertions, 0 deletions
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