[fix] If zsync eats dirt during an OTA update, allow to fallback to a full download (#4438)

* On zsync delta failure, offer to retry OTA update with a full download

Fix #4429

* Bring the "this may take a while" popup back up before full DL

Don't rebuild the local tarball for a full dl, we're ignoring it anyway
;)

Co-Authored-By: NiLuJe <ninuje@gmail.com>
This commit is contained in:
NiLuJe
2019-01-01 20:06:55 +01:00
committed by Frans de Jonge
parent e30bfd34e6
commit 92b8d70342
2 changed files with 70 additions and 16 deletions

View File

@@ -1,7 +1,14 @@
#!/bin/sh
# Figure out whether that's a delta or a full download given the number of arguments passed...
if [ $# -lt 7 ]; then
ZSYNC_MESSAGE="Downloading update data"
else
ZSYNC_MESSAGE="Computing zsync delta"
fi
# Small zsync wrapper so we can get a pretty spinner while it works...
./fbink -q -y -7 -pmh 'Computing zsync delta !'
./fbink -q -y -7 -pmh "${ZSYNC_MESSAGE} !"
# Clear any potential leftover from the local OTA tarball creation.
./fbink -q -y -6 -pm ' '
@@ -26,7 +33,7 @@
usleep 500000
# NOTE: Throw stderr to the void because I'm cheating w/ U+FFFD for a blank character,
# which FBInk replaces by a blank, but not before shouting at us on stderr ;).
./fbink -q -y -7 -pmh "Computing zsync delta ${spin}" 2>/dev/null
./fbink -q -y -7 -pmh "${ZSYNC_MESSAGE} ${spin}" 2>/dev/null
done
done
) &