summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>2012-09-21 19:42:38 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-24 10:30:36 (GMT)
commite36751cdcd6b2a3db31f4597a0b4dd22d5c54330 (patch)
tree5b1903bc4acfeb308ae31cc5e5c722296fec195e
parente46be72a8e5d064b4b46d5b0c37d67bbb2ccae55 (diff)
downloadpoky-e36751cdcd6b2a3db31f4597a0b4dd22d5c54330.tar.gz
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. (From OE-Core rev: b260cf9fbeb6f029c1ce45e77edd03968caa8288) Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/rootfs_ipk.bbclass14
1 files changed, 12 insertions, 2 deletions
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 6cdd8f6..46e8d60 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -97,8 +97,18 @@ fakeroot rootfs_ipk_do_rootfs () {
97 if ${@base_contains("IMAGE_FEATURES", "package-management", "false", "true", d)}; then 97 if ${@base_contains("IMAGE_FEATURES", "package-management", "false", "true", d)}; then
98 if ! grep Status:.install.ok.unpacked ${STATUS}; then 98 if ! grep Status:.install.ok.unpacked ${STATUS}; then
99 # All packages were successfully configured. 99 # All packages were successfully configured.
100 # update-rc.d, base-passwd are no further use, remove them now 100 # update-rc.d, base-passwd, run-postinsts are no further use, remove them now
101 opkg-cl ${IPKG_ARGS} --force-depends remove update-rc.d base-passwd || true 101 remove_run_postinsts=false
102 if [ -e ${IMAGE_ROOTFS}${sysconfdir}/init.d/run-postinsts ]; then
103 remove_run_postinsts=true
104 fi
105 opkg-cl ${IPKG_ARGS} --force-depends remove update-rc.d base-passwd ${ROOTFS_BOOTSTRAP_INSTALL} || true
106
107 # Need to remove rc.d files for run-postinsts by hand since opkg won't
108 # call postrm scripts in offline root mode.
109 if $remove_run_postinsts; then
110 update-rc.d -f -r ${IMAGE_ROOTFS} run-postinsts remove
111 fi
102 112
103 # Also delete the status files 113 # Also delete the status files
104 rm -rf ${IMAGE_ROOTFS}${opkglibdir} 114 rm -rf ${IMAGE_ROOTFS}${opkglibdir}