rootfs_ipk: issue a diagnostic if rootfs is declared read-only and not all maintainer scripts could be applied offline

(From OE-Core rev: 5e9becaa6ba8a0302e3bb91bff0d580127433918)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Phil Blundell 2011-05-24 15:49:10 +01:00 committed by Richard Purdie
parent a3d6defd63
commit 5d1fcb16b2
1 changed files with 10 additions and 0 deletions

View 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