4

Is there a way to set the timeout which pacman uses to establish connections to repository servers? My ISP (university) has blocked several Arch Linux (I use Manjaro) AUR and a few community servers. I want to reduce the timeout, so that 70% of the "download" ends faster, even though some packages are missing. I can get the remaining packages via a slow (trusted) proxy service.

Whenever I start an upgrade pacman tries too hard to download all packages. pacman tries all Arch mirror servers for each package, and this consumes too much time. I know that all these servers are going to timeout for the 30% "blocked" packages.

I don't want to maintain a list of packages that are going to be blocked (even though the list doesn't vary much). This is the behaviour I would like:

  • pacman should quickly download the 70% unblocked ones and then upgrade would fail (because some packages are missing).
  • After enabling the proxy, I'd re-run pacman -Su and the upgrade would get completed.

Specifically these are the errors shown by pacman. I couldn't find any command-line switch for setting timeout.

error: failed retrieving "file" from "server" : Resolving timed out after 10520 milliseconds
error: failed retrieving "file" from "server" : Recv failure: Connection reset by peer
error: failed retrieving "file" from "server" : Could not resolve host: "server"

Or maybe I should setup some scripts to keep track of the packages that seemed to be blocked in the previous upgrade, and defer their downloads in the end?

That still doesn't solve the original problem as there could be a "new blocked" package when I upgrade this time. Deffered downloads would also take an eternity because of the large timeouts.

pacman-mirrors list is always up to date. It gets synced with every upgrade (anyways).

  • Use a tool like Reflector to only query known good mirrors (and a limited subset thereof)... – jasonwryan Mar 17 '16 at 17:59
  • So, to be clear, it's not the mirrors that are blocked, but only certain files? – Xiong Chiamiov Mar 18 '16 at 6:04
  • Not possible; if you have access to the mirror, you have access to all the repos on it... – jasonwryan Mar 20 '16 at 15:45
  • It's been a long time, and I enjoyed unrestricted internet for these months... and was away from this problem :). I will be going back to my university and I'll post better analysis with the install logs to find which files or servers fail. @XiongChiamiov I know just a few files blocked sounds crazy, I find it hard to believe myself and probably I've been wrong in assuming that. – Ananya B Jul 2 '16 at 20:31
  • @jasonwryan Reflector is a great tool, it did speed up my downloads, but my problem remains. – Ananya B Jul 2 '16 at 20:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.