summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorPhil Blundell <pb@pbcl.net>2011-06-01 11:41:11 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-02 14:55:55 +0100
commite24428521aad4c8f62a8876f97dfb377f5efad3a (patch)
treed3418e3e86bde998224c6baa9c41525e63a28898 /meta
parent08bac9fb256ebb0b538b0550040f340af539bafe (diff)
downloadpoky-e24428521aad4c8f62a8876f97dfb377f5efad3a.tar.gz
rootfs_ipk: delete opkg metadata if package management not required and all packages are configured
If all the postinsts were successfully run in offline mode, and package-management hasn't been requested as an IMAGE_FEATURE, the opkg metadata is now redundant and can safely be deleted. Also, the update-rc.d and base-passwd packages can be removed since they will serve no further purpose in this situation. If some packages are still unconfigured at this point then we need to keep their metadata around so that either opkg or the awk script can configure the packages at boot time. In theory it would be possible to strip out the data for packages that have already been configured, but right now we just hold on to the whole status file in that situation. (From OE-Core rev: 87780fc09b066525e47d0f50ee5497db54d304cd) 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.bbclass11
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index edd84fb40d..3b4b4da43d 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -82,6 +82,17 @@ fakeroot rootfs_ipk_do_rootfs () {
82 82
83 rm -f ${IMAGE_ROOTFS}${opkglibdir}/lists/* 83 rm -f ${IMAGE_ROOTFS}${opkglibdir}/lists/*
84 84
85 if ${@base_contains("IMAGE_FEATURES", "package-management", "false", "true", d)}; then
86 if [ $runtime_script_required -eq 0 ]; then
87 # All packages were successfully configured.
88 # update-rc.d, base-passwd are no further use, remove them now
89 opkg-cl ${IPKG_ARGS} --force-depends remove update-rc.d base-passwd || true
90
91 # Also delete the status files
92 rm -rf ${IMAGE_ROOTFS}${opkglibdir}
93 fi
94 fi
95
85 log_check rootfs 96 log_check rootfs
86} 97}
87 98