star-build

Automation tool for project installation
git clone git://git.meso-star.fr/star-build.git
Log | Files | Refs | README | LICENSE

commit bca11972e99625827caec49d4c9efbf75120e6e6
parent 7ad222a699c1c6e794bc8838f7862e4df26adb82
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Thu, 28 Mar 2024 09:20:22 +0100

Update of curl options used to download star packages

These changes are intended to avoid an intermediate state in which the
archive is downloaded but is detected as corrupt when its checksum is
checked. The caller would then have to realize for himself that he must
manually delete the corrupted file before rerunning make, which is not
necessarily obvious.

We thus add the --retry 3 option to force 3 attempts before the download
is definitively considered a failure. The --fail option has also been
added to force curl to return an error if the HTTP server fails to
deliver the archive. By default, the HTTP server returns a document
indicating the problem without curl returning an error.

Note that we could have added the --remove-on-error option, which would
delete the downloaded file in the event of failure. But this option is
fairly recent (curl 7.83.0) and therefore not necessarily available.

Diffstat:
Msrc/spkg.mk.in | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/spkg.mk.in b/src/spkg.mk.in @@ -8,7 +8,7 @@ fi @ARCH@.sha512sum @ARCH@.tgz: - curl -O "@PATH@/$@" + curl --fail --retry 3 -O "@PATH@/$@" uninstall_@NAME@: prefix if [ -f "$$(cat .prefix)/share/spkg/@NAME@.sh" ]; then\