summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorPhil Blundell <pb@pbcl.net>2011-05-24 15:49:10 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-25 15:50:57 +0100
commit5d1fcb16b23f6cb86f0cd10015cb16513b23ea87 (patch)
tree89981e6f3ddadabbb43c95a840e6d9ede04f5e90 /meta
parenta3d6defd6365b6eae717bcf3568916306650db8a (diff)
downloadpoky-5d1fcb16b23f6cb86f0cd10015cb16513b23ea87.tar.gz
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>
Diffstat (limited to 'meta')
-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 () {
54 ${OPKG_POSTPROCESS_COMMANDS} 54 ${OPKG_POSTPROCESS_COMMANDS}
55 ${ROOTFS_POSTINSTALL_COMMAND} 55 ${ROOTFS_POSTINSTALL_COMMAND}
56 56
57 runtime_script_required=0
57 for i in ${IMAGE_ROOTFS}${opkglibdir}/info/*.preinst; do 58 for i in ${IMAGE_ROOTFS}${opkglibdir}/info/*.preinst; do
58 if [ -f $i ] && ! sh $i; then 59 if [ -f $i ] && ! sh $i; then
60 runtime_script_required=1
59 opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .preinst` 61 opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .preinst`
60 fi 62 fi
61 done 63 done
62 for i in ${IMAGE_ROOTFS}${opkglibdir}/info/*.postinst; do 64 for i in ${IMAGE_ROOTFS}${opkglibdir}/info/*.postinst; do
63 if [ -f $i ] && ! sh $i configure; then 65 if [ -f $i ] && ! sh $i configure; then
66 runtime_script_required=1
64 opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .postinst` 67 opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .postinst`
65 fi 68 fi
66 done 69 done
67 70
71 if ${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "true", "false" ,d)}; then
72 if [ $runtime_script_required -eq 1 ]; then
73 echo "Some packages could not be configured offline and rootfs is read-only."
74 exit 1
75 fi
76 fi
77
68 install -d ${IMAGE_ROOTFS}/${sysconfdir} 78 install -d ${IMAGE_ROOTFS}/${sysconfdir}
69 echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version 79 echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version
70 80