scripts: Fix to invoke as an error when untar fails 14/300014/1 tizen_6.5
authorSangYoun Kwak <sy.kwak@samsung.com>
Fri, 13 Oct 2023 10:49:15 +0000 (19:49 +0900)
committerSangYoun Kwak <sy.kwak@samsung.com>
Fri, 13 Oct 2023 11:03:59 +0000 (20:03 +0900)
Previously, if the untaring of any delta file from the delta.tar.gz
fails, then the script ignored it and continued to the next delta file.
This may cause some delta files to be not applied which causes the
failure of the FOTA as a result.
To prevent this, the log message was changed to 'Error' from 'Info" and
'exit_error' was used instead of 'continue'.

Change-Id: I5a264b7a5c163c5abd2a11df49ff9e7081451fcf
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
scripts/upgrade-common.inc

index 57ea61f00549d0bfb60fb6eefd48bbc328dc49f4..a80a3fad2ef6f6ece13527f41d1e7ed5aa9beca7 100644 (file)
@@ -206,8 +206,8 @@ upgrade_images() {
                fi
 
                if ! /bin/tar tf "$DELTA_TAR" "$DELTA_NAME"; then
-                       flog "[Info] There is no delta $DELTA_NAME for label $LABEL_NAME from part $PART_NAME"
-                       continue
+                       flog "[Error] There is no delta $DELTA_NAME for label $LABEL_NAME from part $PART_NAME"
+                       exit_error
                fi
 
                local NEXT_PARTITION="$(/usr/bin/blkid-print "$EMMC_DEVICE" "$PART_NAME" "$NEXT_AB" |\