When building without package management we can end with a system without opkg and thus without support for running unfinished postinsts on first boot, we fix this providing a S98configure script for this use case.
Signed-off-by: Otavio Salvador <[email protected]> --- meta/classes/rootfs_ipk.bbclass | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass index 2df8ca4..11ab8a1 100644 --- a/meta/classes/rootfs_ipk.bbclass +++ b/meta/classes/rootfs_ipk.bbclass @@ -96,6 +96,22 @@ fakeroot rootfs_ipk_do_rootfs () { # Also delete the status files rm -rf ${IMAGE_ROOTFS}${opkglibdir} + else + if [ ! -e ${IMAGE_ROOTFS}${bindir}/opkg-cl ]; then + # We need to run postinsts but lack opkg, do it byhand + cat > ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d/S98configure <<EOF +#!/bin/sh + +for pkg in \`grep -B4 Status:.install.ok.unpacked ${opkglibdir}/status | awk '/^Package: / { print \$2 }'\`; do + ${opkglibdir}/info/\$pkg.postinst configure +done + +rm -rf ${opkglibdir} + +rm ${sysconfdir}/rcS.d/S98configure +EOF + chmod a+x ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d/S98configure + fi fi fi set +x -- 1.7.2.5 _______________________________________________ Openembedded-core mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
