On 13/1/22 23:11, Christian Hesse wrote:
Hello everybody,

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 [0] was
reject.

Also someone proposed to add a configuration option to disable server error
limit [1]... 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 [2]. Looks like Allan did not
fine the "spare 30 minutes" [3] 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?

[0] https://lists.archlinux.org/pipermail/pacman-dev/2021-May/025159.html
[1] https://bugs.archlinux.org/task/71352
[2] https://bugs.archlinux.org/task/23407
[3] 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.

Allan

Reply via email to