FS#69531 - Improve reporting of 404s and other errors in Pacman 6 parallel downloading
|
Details
Summary and Info:
When downloading things with Pacman 6, it's sometimes the case that it appears to get stuck. I ended up downgrading to stable, only to observe the reason it was probably failing was that I hadn't run pacman -Syu recently and so the package download was hitting a 404. This is a suboptimal user experience. I'd like it to give an indication of why it is appearing to be stuck (not necessarily which mirrors are 404'ing, just that it is happening). Steps to Reproduce: Forget to upgrade your computer for a while Pacman gets some 404s it doesn't report and appears stuck while downloading a package. |
This task depends upon
bash-5.1.004-1-x86_64.pkg.tar.zst failed to download
The reason for the failed downloads are currently given at the end of all downloads.
I caused this on purpose for testing by putting:
Server=https://archive.archlinux.org/repos/2020/09/30/$repo/os/$arch
into my pacman mirrorlist, commenting out all the other entries, `pacman -Syy`, removing the archive line and restoring my normal mirrors, then `pacman -S vim` (or another package that's been updated recently).
The `pacman -S vim` command will sit at:
vim-8.2.1704-1-x86_64.pkg.tar.zst downloading...
for a couple of minutes. Eventually it might find a mirror that has the old package and download it.
However, this is more frustrating on Pacman 6 since it will defer printing the dozens of errors such as:
error: failed retrieving file 'vim-8.2.1704-1-x86_64.pkg.tar.zst' from mirror.pseudoform.org : The requested URL returned error: 404
error: failed retrieving file 'vim-runtime-8.2.1704-1-x86_64.pkg.tar.zst' from mirror.pseudoform.org : The requested URL returned err
or: 404
until after it finishes the download of the package from the one mirror that has it, but without these errors, it is unclear why it is sitting there, whether it is a network issue/the mirror is down, or that `pacman -Syu` needs to be run to update sync databases. In previous versions, Pacman would print the errors as it gets them, so it would be possible to know after the first failure (taking about 5s) that the particular issue is stale sync databases.