diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-01-26 14:40:40 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-03 14:53:50 +0000 |
commit | 26e5b0f7b9a52d6eed7d46c003c45b202acabebc (patch) | |
tree | 785f72a27f005e3cd56dd7b4cf628bf09b7c1ad0 /meta/classes/image.bbclass | |
parent | 69c588b66d5d44ed97e21826ff2501c76e5b4ea8 (diff) | |
download | poky-26e5b0f7b9a52d6eed7d46c003c45b202acabebc.tar.gz |
classes/image: ensure uninstalled packages do not appear in manifests
Since the rewrite of the image construction code in python a few
releases ago, we remove a couple of packages from the image as one of
the final steps when constructing the image (notably update-rc.d and
run-postinsts). However, because of the order of operations, these
packages are still listed both in the buildhistory
installed_package*.txt files and in the manifest file created next to
the image, which is wrong.
There were two possible solutions to this: (1) change the order such
that the uninstallation occurs before calling ROOTFS_POSTPROCESS_COMMAND
or (2) add another hook variable in such that we can have the
package list collection code run at the right time. Because it's
currently possible (but very much not recommended) to install additional
packages within ROOTFS_POSTPROCESS_COMMAND, which may have postinstall
scripts and thus require the packages we would otherwise uninstall if we
were to take option 1, option 2 is really the least likely to cause
problems. Therefore, add ROOTFS_POSTUNINSTALL_COMMAND and make the image
and buildhistory classes use it.
Fixes [YOCTO #6479].
(From OE-Core rev: b198a189228648057c3be7d068598f50841b3bf9)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r-- | meta/classes/image.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index d4c98db9ea..f09bfeea27 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
@@ -167,7 +167,7 @@ ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "debug-twe | |||
167 | ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "postinst_enable_logging; ", "",d)}' | 167 | ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "postinst_enable_logging; ", "",d)}' |
168 | # Write manifest | 168 | # Write manifest |
169 | IMAGE_MANIFEST = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest" | 169 | IMAGE_MANIFEST = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest" |
170 | ROOTFS_POSTPROCESS_COMMAND =+ "write_image_manifest ; " | 170 | ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; " |
171 | # Set default postinst log file | 171 | # Set default postinst log file |
172 | POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log" | 172 | POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log" |
173 | # Set default target for systemd images | 173 | # Set default target for systemd images |