diff options
author | Phil Blundell <philb@gnu.org> | 2012-09-21 20:42:38 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-24 11:26:24 +0100 |
commit | b260cf9fbeb6f029c1ce45e77edd03968caa8288 (patch) | |
tree | 54201779c2912055131191e90903a0976041f60d /meta/classes/rootfs_ipk.bbclass | |
parent | 85ed217b603a86113dda11d952850e8ceed30795 (diff) | |
download | openembedded-core-b260cf9fbeb6f029c1ce45e77edd03968caa8288.tar.gz openembedded-core-b260cf9fbeb6f029c1ce45e77edd03968caa8288.tar.bz2 openembedded-core-b260cf9fbeb6f029c1ce45e77edd03968caa8288.zip |
rootfs_ipk: Avoid leaving run-postinsts around if online package management is disabled
If all postinsts have already been run during rootfs construction then
there's no point in having run-postinsts in the installed system.
Clean it up at the same time that update-rc.d and suchlike are being
removed.
Signed-off-by: Phil Blundell <pb@pbcl.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rootfs_ipk.bbclass')
-rw-r--r-- | meta/classes/rootfs_ipk.bbclass | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass index 6cdd8f6062..46e8d60918 100644 --- a/meta/classes/rootfs_ipk.bbclass +++ b/meta/classes/rootfs_ipk.bbclass @@ -97,8 +97,18 @@ fakeroot rootfs_ipk_do_rootfs () { if ${@base_contains("IMAGE_FEATURES", "package-management", "false", "true", d)}; then if ! grep Status:.install.ok.unpacked ${STATUS}; then # All packages were successfully configured. - # update-rc.d, base-passwd are no further use, remove them now - opkg-cl ${IPKG_ARGS} --force-depends remove update-rc.d base-passwd || true + # update-rc.d, base-passwd, run-postinsts are no further use, remove them now + remove_run_postinsts=false + if [ -e ${IMAGE_ROOTFS}${sysconfdir}/init.d/run-postinsts ]; then + remove_run_postinsts=true + fi + opkg-cl ${IPKG_ARGS} --force-depends remove update-rc.d base-passwd ${ROOTFS_BOOTSTRAP_INSTALL} || true + + # Need to remove rc.d files for run-postinsts by hand since opkg won't + # call postrm scripts in offline root mode. + if $remove_run_postinsts; then + update-rc.d -f -r ${IMAGE_ROOTFS} run-postinsts remove + fi # Also delete the status files rm -rf ${IMAGE_ROOTFS}${opkglibdir} |