We currently use wget for this functionality in all of our modules where downloading things from the internet is required.
While wget works alright, I think that we should investigate using curl instead, as it's reported as a more reliable tool for this purpose.
curl's log output doesn't contain URL it downloads, as it has less verbose output in general compared to wget, so that needs to be manually added for troubleshooting purposes.
Notes
@jonerrr faced & reported the issue in Discord with gnome-extensions module when curl was used.
It partially downloaded the ZIP file without reporting about any errors & caused the module to fail in installing the extension. This only happened once, while every other usage was successful, including mine.
Notice that the file-size is different, yet the failed one reports "100%" download percent.
It is not clear if it was the server issue with https://extensions.gnome.org/, with my usage of curl with curl -L command or with curl as a tool itself.
Advantages
curl supports much more formats for downloading things than wget does.
Notably, ftp is not supported in wget.
Intro
We currently use
wget
for this functionality in all of our modules where downloading things from the internet is required.While
wget
works alright, I think that we should investigate usingcurl
instead, as it's reported as a more reliable tool for this purpose.curl
's log output doesn't contain URL it downloads, as it has less verbose output in general compared towget
, so that needs to be manually added for troubleshooting purposes.Notes
@jonerrr faced & reported the issue in Discord with
gnome-extensions
module whencurl
was used. It partially downloaded the ZIP file without reporting about any errors & caused the module to fail in installing the extension. This only happened once, while every other usage was successful, including mine.Failed
curl
: https://github.com/jonerrr/os-image/actions/runs/8639540324/job/23686029150#step:2:2607Successful
curl
: https://github.com/fiftydinar/gidro-os/actions/runs/8650263976/job/23718377093#step:2:1682Notice that the file-size is different, yet the failed one reports "100%" download percent.
It is not clear if it was the server issue with https://extensions.gnome.org/, with my usage of
curl
withcurl -L
command or withcurl
as a tool itself.Advantages
curl
supports much more formats for downloading things thanwget
does.Notably,
ftp
is not supported inwget
.