Christian Hesse <list@eworm.de> on Mon, 2022/01/24 00:58:
This implements a new configuration option 'CacheServer'. Adding a cache server makes it ignore the server error limit.
We have a struct that stores the server errors. Extend (and rename) this struct to store if this is a cache server. The errors are not increased for cache servers, thus they are never ignored.
I think storing the cache server state together with the server errors is the only reasonable solution. Extending 'alpm_list_t *servers' would not help a lot as download functions do not have a reference to its server in that list if I got this right. One thing is still missing, though. I think Allen wanted the cache server not to be used for database files. In lib/libalpm/dload.c the code iterated over payload->servers, but only indication there about a database file is its file name (payload->filepath)? Except for the limitation above (which is not an issue for me :) this seems to works really well. Please test, review and comment... -- main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/* Best regards my address: */=0;b=c[a++];) putchar(b-1/(/* Chris cc -ox -xc - && ./x */b/42*2-3)*42);}