HomeFreeBSD

fetch(1): process truncated transfer as soft failure

Description

fetch(1): process truncated transfer as soft failure

Let "fetch -a" resume truncated transfer automatically
perform another attempt if it obtained some new data in previous one
making progress.

This makes it more robust against frequent but transient network failures.
For example:

> sqlite-src-3370200.zip doesn't seem to exist in /usr/ports/distfiles/.

> Attempting to fetch https://www.sqlite.org/2022/sqlite-src-3370200.zip

sqlite-src-3370200.zip 3% of 12 MB 45 kBps 04m24s
fetch: sqlite-src-3370200.zip appears to be truncated: 524288/13145234 bytes
sqlite-src-3370200.zip 10% of 12 MB 67 kBps 02m56s
fetch: sqlite-src-3370200.zip appears to be truncated: 1327104/13145234 bytes
sqlite-src-3370200.zip 28% of 12 MB 123 kBps 01m14s
fetch: sqlite-src-3370200.zip appears to be truncated: 3735552/13145234 bytes
sqlite-src-3370200.zip 54% of 12 MB 253 kBps 24s
fetch: sqlite-src-3370200.zip appears to be truncated: 7176192/13145234 bytes
sqlite-src-3370200.zip 62% of 12 MB 90 kBps 55s
fetch: sqlite-src-3370200.zip appears to be truncated: 8241152/13145234 bytes
sqlite-src-3370200.zip 82% of 12 MB 113 kBps 20s
fetch: sqlite-src-3370200.zip appears to be truncated: 10862592/13145234 bytes
sqlite-src-3370200.zip 12 MB 185 kBps 12s

> Fetching all distfiles required by sqlite3-3.37.2,1 for building

MFC after: 1 month

Details

Provenance
eugen_grosbein.netAuthored on Jan 24 2022, 4:03 AM
Parents
rGf72926eab00c: mountd: Delay starting mountd until after mountlate
Branches
Unknown
Tags
Unknown