meta-google: gbmc-update: supress tar warning message
A warning message together with an expected error message will fail the
update process. This will filter out all warning messages.
Tested:
before
root@dddhl23-nfd01:/tmp# cat mytemp/tarerr
tar: testdir/somefile1: time stamp 2024-04-26 02:48:00 is 37351.697053733 s in the future
tar: */somefile2: Not found in archive
tar: Exiting with failure status due to previous errors
after
root@dddhl23-nfd01:/tmp# cat mytemp/tarerr
tar: */somefile2: Not found in archive
tar: Exiting with failure status due to previous errors
Change-Id: Ica9481383031ede950568a09a86eefb4fbfbdd6f
Signed-off-by: Yuxiao Zhang <yuxiaozhang@google.com>
diff --git a/meta-google/recipes-phosphor/flash/gbmc-update/40-gbmc-upgrade.sh b/meta-google/recipes-phosphor/flash/gbmc-update/40-gbmc-upgrade.sh
index 9c773c3..0b927f0 100644
--- a/meta-google/recipes-phosphor/flash/gbmc-update/40-gbmc-upgrade.sh
+++ b/meta-google/recipes-phosphor/flash/gbmc-update/40-gbmc-upgrade.sh
@@ -51,7 +51,7 @@
while true; do
local st=()
curl -LSsk --max-time $((timeout - SECONDS)) "$bootfile_url" |
- tar "${tflags[@]}" --wildcards -xC "$tmpdir" "${GBMC_UPGRADE_UNPACK_FILES[@]}" 2>"$tmpdir"/tarerr \
+ tar "${tflags[@]}" --wildcards --warning=none -xC "$tmpdir" "${GBMC_UPGRADE_UNPACK_FILES[@]}" 2>"$tmpdir"/tarerr \
&& st=("${PIPESTATUS[@]}") || st=("${PIPESTATUS[@]}")
# Curl failures should continue
if (( st[0] == 0 )); then