Allan McRae <[email protected]> on Fri, 2022/01/14 00:36: > On 14/1/22 00:12, Christian Hesse wrote: > > Allan McRae <[email protected]> on Thu, 2022/01/13 23:52: > >> 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. > > > > Sure, so we want to put cache and regular servers in a single list? > > > > Currently this uses alpm_list_t, which is a doubly linked list. The > > servers are added as 'char *' there. Do we want to add a struct for > > servers which adds a field for storing its type? > > > > typedef struct _alpm_server_t { > > int cache; > > char *server; > > } alpm_server_t; > > > > Having not looked at this in detail... my initial reaction is no. > Assuming we allow a single CacheServer, would it be more efficient to > add the field into the payload struct?
Why limit to just one cache server? For me (with pacredir) this would be sufficient, but I guess others will complain: Having several servers in a network sharing their cache you could add all of them to the configuration: [core] CacheServer = http://server-a.localdomain/ CacheServer = http://server-b.localdomain/ Server = ... -- 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);}
pgpW2NXomdrGQ.pgp
Description: OpenPGP digital signature
