You are not logged in.

#1 2014-03-19 12:33:19

Rob Wu
Member
Registered: 2014-03-19
Posts: 3

Network-dependent mirrorlist or faster timeout for unreachable mirrors

At home, there are multiple running instances of ArchLinux. To speed up package downloads, a shared pacman cache is set up https://wiki.archlinux.org/index.php/Pa … cman_cache), and its local IP address has been added to the top of /etc/pacman.d/mirrorlist.

This works well when I'm at home, but if I'm elsewhere, this host is obviously not reachable. Hence I want to skip this mirror when the mirror is unavailable. To achieve that, I've considered a few options:

  1. Decreasing the connection time-out from 10 to 2. Unfortunately, this value seems to be hard-coded in pacman's source code and I'm not aware of any environment variables to override the timeout of libcurl, so this is not an option

  2. Add a script to /etc/NetworkManager/dispatcher.d that updates the mirrorlist whenever the active network changes.

I'm currently writing a script using the second approach, but was wondering if there's any other (better way) to achieve the desired result.

Offline

Board footer

Powered by FluxBB