From: vijaikumar.kanagarajan@gmail.com
To: isar-users@googlegroups.com
Cc: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
Subject: [PATCH] targz-img: Ignore tar exit code 1
Date: Thu, 5 Dec 2019 23:14:41 +0530 [thread overview]
Message-ID: <20191205174441.16406-1-Vijaikumar_Kangarajan@mentor.com> (raw)
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
next reply other threads:[~2019-12-05 17:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-05 17:44 vijaikumar.kanagarajan [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191205174441.16406-1-Vijaikumar_Kangarajan@mentor.com \
--to=vijaikumar.kanagarajan@gmail.com \
--cc=Vijaikumar_Kanagarajan@mentor.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox