paru icon indicating copy to clipboard operation
paru copied to clipboard

curl error is fatal (no redownload attempt)

Open RubenKelevra opened this issue 2 years ago • 3 comments

Affected Version

paru v1.10.0 - libalpm v13.0.1

Description

I noticed that paru doesn't recovery from a partial download of a source file. Curl complains that there's still stuff to fetch, and the connection got closed, but paru will just hard fail upon this issue and go to the next package. Can we try to continue the download if something like this happens?

Output

Simple paru -S $packagename:

==> Starting package()...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 30  104M   30 32.0M    0     0   200k      0  0:08:57  0:02:43  0:06:14  604k
curl: (18) transfer closed with 76523050 bytes remaining to read
==> ERROR: A failure occurred in package().
    Aborting...

RubenKelevra avatar Apr 13 '22 20:04 RubenKelevra

This is makepkg downloading so nothing can be done. I think it may resume the download at least.

Morganamilo avatar Apr 13 '22 20:04 Morganamilo

Well, is there a way we could fetch the files "manually" and place them in the folder, instead of having makepkg calling curl? This would allow us to retry and resume.

RubenKelevra avatar Apr 14 '22 12:04 RubenKelevra

This would also solve this issue:

==> Making package: eternalterminal 6.1.11-1 (2022-04-17T12:45:40 CEST)
==> Retrieving sources...
  -> Downloading et-v6.1.11.tar.gz...
** Resuming transfer from byte position 17543168
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   147  100   147    0     0    199      0 --:--:-- --:--:-- --:--:--   199
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
curl: (33) HTTP server doesn't seem to support byte ranges. Cannot resume.
==> ERROR: Failure while downloading https://github.com/MisterTea/EternalTerminal/archive/et-v6.1.11.tar.gz
    Aborting...
==> ERROR: Could not download sources.

RubenKelevra avatar Apr 17 '22 10:04 RubenKelevra

Same as the linked issue. Make a feature request on makepkg.

Morganamilo avatar Nov 21 '22 11:11 Morganamilo