summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-07-28 12:29:22 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-30 08:46:19 +0100
commita9cab2f0edf693d336935c4f915c22fa5870b423 (patch)
tree3c9a6547d1e5ac3b6b5d331a4ab618addb3d5499 /meta/classes
parent373ea52b896c85655f8883ee7608a4c038c9f120 (diff)
downloadpoky-a9cab2f0edf693d336935c4f915c22fa5870b423.tar.gz
image_types.bbclass: ignore tar exit code 1
tar exists with 1 and produces warning "file changed as we read it" if content is changed while tar archives it. Even hardlinking content causes tar to fail this way as it changes file ctime. Other tasks running in parallel with do_image_tar may need to hardlink rootfs content in order to change it, e.g. do_image_wic does this to update etc/fstab. Ignored tar exit code 1 to be able to hardlink rootfs content while do_rootfs_tar is tarring it. [RP: Removed bashism] (From OE-Core rev: 402b4cffbb4c58cfee93db18192f2b218ee0ae35) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/image_types.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index cf946a6874..ae4ed4fae4 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -119,7 +119,8 @@ IMAGE_CMD_squashfs-lzo = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAM
119# In practice, it turned out to be not needed when creating archives and 119# In practice, it turned out to be not needed when creating archives and
120# required when extracting, but it seems prudent to use it in both cases. 120# required when extracting, but it seems prudent to use it in both cases.
121IMAGE_CMD_TAR ?= "tar" 121IMAGE_CMD_TAR ?= "tar"
122IMAGE_CMD_tar = "${IMAGE_CMD_TAR} -cvf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} ." 122# ignore return code 1 "file changed as we read it" as other tasks(e.g. do_image_wic) may be hardlinking rootfs
123IMAGE_CMD_tar = "${IMAGE_CMD_TAR} -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} . || [ $? -eq 1 ]"
123 124
124do_image_cpio[cleandirs] += "${WORKDIR}/cpio_append" 125do_image_cpio[cleandirs] += "${WORKDIR}/cpio_append"
125IMAGE_CMD_cpio () { 126IMAGE_CMD_cpio () {