On 13/1/22 23:11, Christian Hesse wrote:
I am still struggling with pacman having the server error limit enabled by default. My attempt to fix this for my use case with http headers  was reject.
Also someone proposed to add a configuration option to disable server error limit ... It was rejected as well.
But I guess the best way to solve this is finally implementing an option "CacheServer", as requested a long time ago . Looks like Allan did not fine the "spare 30 minutes"  to implement... :)
Thus I would like to have a look. Still I would like to have a rough guide where to put what and how to glue things. Anybody wants to share some thoughts what an acceptable solution should look like?
 https://lists.archlinux.org/pipermail/pacman-dev/2021-May/025159.html  https://bugs.archlinux.org/task/71352  https://bugs.archlinux.org/task/23407  https://lists.archlinux.org/pipermail/pacman-dev/2021-June/025184.html
I have had a spare 5 minutes... you need to add a CacheServer global option to pacman.conf and wire that into pacman & libalpm. Then when forming the list of Servers in a download payload for a package, you need to add that server at the top and note that it is a cache server. Then in the try next server function, check if we are using the cache server, and silently move onto the normal servers.