summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Blundell <pb@pbcl.net>2011-05-24 15:49:10 +0100
committerSaul Wold <sgw@linux.intel.com>2011-05-25 01:36:32 -0700
commit5e9becaa6ba8a0302e3bb91bff0d580127433918 (patch)
tree229f15a63235070c517c31aac5c1776cf215d56f
parent367934ada7c081ba3fc95f02dc14c7d6f97bfccb (diff)
downloadopenembedded-core-5e9becaa6ba8a0302e3bb91bff0d580127433918.tar.gz
openembedded-core-5e9becaa6ba8a0302e3bb91bff0d580127433918.tar.bz2
openembedded-core-5e9becaa6ba8a0302e3bb91bff0d580127433918.zip
rootfs_ipk: issue a diagnostic if rootfs is declared read-only and not all maintainer scripts could be applied offline
Signed-off-by: Phil Blundell <philb@gnu.org>
-rw-r--r--meta/classes/rootfs_ipk.bbclass10
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 5727d1502b..edd84fb40d 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -54,17 +54,27 @@ fakeroot rootfs_ipk_do_rootfs () {
${OPKG_POSTPROCESS_COMMANDS}
${ROOTFS_POSTINSTALL_COMMAND}
+ runtime_script_required=0
for i in ${IMAGE_ROOTFS}${opkglibdir}/info/*.preinst; do
if [ -f $i ] && ! sh $i; then
+ runtime_script_required=1
opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .preinst`
fi
done
for i in ${IMAGE_ROOTFS}${opkglibdir}/info/*.postinst; do
if [ -f $i ] && ! sh $i configure; then
+ runtime_script_required=1
opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .postinst`
fi
done
+ if ${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "true", "false" ,d)}; then
+ if [ $runtime_script_required -eq 1 ]; then
+ echo "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