[PATCH v1 1/1] implement CacheServer

Christian Hesse list at eworm.de
Mon Jan 24 10:42:52 UTC 2022


Christian Hesse <list at 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);}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20220124/f0a9c75a/attachment.sig>


More information about the pacman-dev mailing list