summaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-11-26 12:09:52 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-26 23:01:32 +0000
commit960e305d9abbbeed0ed2d5251ff94cf1719e5159 (patch)
treef87d43abb5a24f12b58d73e934ee2bb05456fa75 /meta/classes/image.bbclass
parentbbbd6fc1d1342936b583289c6dcaf7b4ea60eb5c (diff)
downloadpoky-960e305d9abbbeed0ed2d5251ff94cf1719e5159.tar.gz
classes/image: write image manifest
Write a list of installed packages to a .manifest file next to the image, so we can find out what went into the image after it has been constructed without necessarily having to have buildhistory enabled (although that will provide more detail.) We can make use of this for example in the testimage class associated code that checks for installed packages for determining whether or not to run specific tests. Note: this replaces the previous ipk-specific manifest code with something that works for ipk, rpm and deb, and instead of a pruned status file, packages are listed one per line, in the following format: <packagename> <packagearch> <version> Tests for all three backends have shown that the performance impact of this change is negligible (about 1.5s max). Implements [YOCTO #5410] (From OE-Core rev: 2978d1f2617a33e2e3a77e249d73e998d79b4ec9) 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.bbclass15
1 files changed, 9 insertions, 6 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index bc60f0d6c0..8217fb3254 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -179,6 +179,9 @@ ROOTFS_POSTPROCESS_COMMAND_prepend = "run_intercept_scriptlets; "
179ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("IMAGE_FEATURES", "debug-tweaks", "ssh_allow_empty_password; ", "",d)}' 179ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("IMAGE_FEATURES", "debug-tweaks", "ssh_allow_empty_password; ", "",d)}'
180# Enable postinst logging if debug-tweaks is enabled 180# Enable postinst logging if debug-tweaks is enabled
181ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("IMAGE_FEATURES", "debug-tweaks", "postinst_enable_logging; ", "",d)}' 181ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("IMAGE_FEATURES", "debug-tweaks", "postinst_enable_logging; ", "",d)}'
182# Write manifest
183IMAGE_MANIFEST = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest"
184ROOTFS_POSTPROCESS_COMMAND =+ "write_image_manifest ; "
182# Set default postinst log file 185# Set default postinst log file
183POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log" 186POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log"
184 187
@@ -381,6 +384,11 @@ fakeroot do_rootfs () {
381 ${IMAGE_POSTPROCESS_COMMAND} 384 ${IMAGE_POSTPROCESS_COMMAND}
382 385
383 ${MACHINE_POSTPROCESS_COMMAND} 386 ${MACHINE_POSTPROCESS_COMMAND}
387
388 if [ -n "${IMAGE_LINK_NAME}" -a -f "${IMAGE_MANIFEST}" ]; then
389 rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.manifest
390 ln -s ${IMAGE_NAME}.rootfs.manifest ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.manifest
391 fi
384} 392}
385 393
386insert_feed_uris () { 394insert_feed_uris () {
@@ -602,12 +610,7 @@ make_zimage_symlink_relative () {
602} 610}
603 611
604write_image_manifest () { 612write_image_manifest () {
605 rootfs_${IMAGE_PKGTYPE}_write_manifest 613 list_installed_packages ver | sort > ${IMAGE_MANIFEST}
606
607 if [ -n "${IMAGE_LINK_NAME}" ]; then
608 rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.manifest
609 ln -s ${IMAGE_NAME}.rootfs.manifest ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.manifest
610 fi
611} 614}
612 615
613# Make login manager(s) enable automatic login. 616# Make login manager(s) enable automatic login.