base-files: sysupgrade: handle errors when generating backup
authorRafał Miłecki <[email protected]>
Mon, 4 Mar 2024 14:18:13 +0000 (15:18 +0100)
committerRafał Miłecki <[email protected]>
Tue, 5 Mar 2024 10:54:55 +0000 (11:54 +0100)
commit4efbfcd996abd351547203cf5d51d53564ada5fb
treeb0861e12b7868fb55521e6a2767560d7a377f5e9
parent93610492b634c94e882dc048fde23d67a056ea1a
base-files: sysupgrade: handle errors when generating backup

1. Return error if any step of generating tar file fails
2. Use pipefail to avoid calling "gzip" if tar failed

Fixes: e36cc530927c ("base-files: sysupgrade: use tar helper to include installed_packages.txt")
Reported-by: Luiz Angelo Daros de Luca <[email protected]>
Cc: Luiz Angelo Daros de Luca <[email protected]>
Cc: Jo-Philipp Wich <[email protected]>
Signed-off-by: Rafał Miłecki <[email protected]>
package/base-files/files/sbin/sysupgrade