]> code.ossystems Code Review - openembedded-core.git/commitdiff
rootfs_ipk: issue a diagnostic if rootfs is declared read-only and not all maintainer...
authorPhil Blundell <pb@pbcl.net>
Tue, 24 May 2011 14:49:10 +0000 (15:49 +0100)
committerSaul Wold <sgw@linux.intel.com>
Wed, 25 May 2011 08:36:32 +0000 (01:36 -0700)
Signed-off-by: Phil Blundell <philb@gnu.org>
meta/classes/rootfs_ipk.bbclass

index 5727d1502bc7af89fcf4fb8e00868bba09213989..edd84fb40d50aef22c4037bb2b24bebd683256d4 100644 (file)
@@ -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