[OE-core] [Updated Consolidated Pull 18/19] rootfs_ipk: issue a diagnostic if rootfs is declared read-only and not all maintainer scripts could be applied offline
Saul Wold
sgw at linux.intel.com
Wed May 25 08:40:40 UTC 2011
From: Phil Blundell <pb at pbcl.net>
Signed-off-by: Phil Blundell <philb at gnu.org>
---
meta/classes/rootfs_ipk.bbclass | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 5727d15..edd84fb 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
--
1.7.3.4
More information about the Openembedded-core
mailing list