public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] targz-img: Ignore tar exit code 1
@ 2019-12-05 17:44 vijaikumar.kanagarajan
  2019-12-05 18:04 ` Jan Kiszka
  0 siblings, 1 reply; 9+ messages in thread
From: vijaikumar.kanagarajan @ 2019-12-05 17:44 UTC (permalink / raw)
  To: isar-users; +Cc: Vijai Kumar K

From: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>

Sometimes during packaging tar prints a warning "file changed as we read it"
and exits with return code 1. This is observed when we generete both
wic-img and targz-img together. Ignore the error.

References:
https://lists.gnu.org/archive/html/bug-tar/2010-09/msg00017.html
https://github.com/openembedded/openembedded-core/commit/402b4cffbb4c58cfee93db18192f2b218ee0ae35

Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
---
 meta/classes/targz-img.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes/targz-img.bbclass b/meta/classes/targz-img.bbclass
index d9dadae..68cf80e 100644
--- a/meta/classes/targz-img.bbclass
+++ b/meta/classes/targz-img.bbclass
@@ -7,7 +7,9 @@ TARGZ_IMAGE_FILE = "${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.tar.gz"
 
 do_targz_image() {
     rm -f ${TARGZ_IMAGE_FILE}
-    sudo tar -cvzf ${TARGZ_IMAGE_FILE} --one-file-system -C ${IMAGE_ROOTFS} .
+    sudo -s <<'EOSUDO'
+        tar -cvzf ${TARGZ_IMAGE_FILE} --one-file-system -C ${IMAGE_ROOTFS} . || [ $? -eq 1 ]
+EOSUDO
 }
 
 addtask targz_image before do_image after do_image_tools
-- 
2.17.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-02-06 18:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-05 17:44 [PATCH] targz-img: Ignore tar exit code 1 vijaikumar.kanagarajan
2019-12-05 18:04 ` Jan Kiszka
2019-12-05 19:17   ` Vijai Kumar K
2019-12-05 19:31     ` Jan Kiszka
2019-12-06 10:32       ` Henning Schild
2019-12-06 11:13       ` Gylstorff Quirin
2019-12-06 11:18         ` vijai kumar
2020-01-29  6:33       ` Vijai Kumar K
2020-02-06 18:58         ` vijai kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox