Hallo, * Colin Watson [Thu, Jan 26 2012, 02:19:55PM]: > gb.archive.ubuntu.com". However, apt-cacher-ng seems to be all or > nothing: if it sees a 404 from the first backend, it returns that to the > client immediately, so there's no way to get it to fall back to a later > backend in the case that an earlier one is missing some files.
Sounds familiar. I have an experimental armel system which I upgrade from time to time but my main (fast) mirror doesn't provide armel packages. > I'd like to be able to annotate a backend as partial, meaning that > apt-cacher-ng would respond to a 404 from that backend by trying the > next backend in the list. Would that be possible? In fact, there is already a such feature but better read the explanation below. The main problem is: the proxy cannot threat 404s like fatal errors because apt also uses that status codes in order to check the absense of some files and choose a replacement strategy (like using .gz version instead of .bz2). The trick is to catch the first 404 occurence which should trigger the switch to another backend. See "keyfile" and related comments in http://www.unix-ag.uni-kl.de/~bloch/acng/html/config-serv.html#remap-trickz . For apt-get update/dist-upgrade, it should be enough to list Release and .deb there (IMHO nowadays also InRelease). The weakness of this strategy is that it may hide problems, i.e. the mirror switch is set for the rest of requests within a connection. But if the client reconnects later (or even reconnects for every request) then the games starts from the beginning and the next request should better be matching one of the keyfile= patterns. Another minor problem is that if local index data is outdated then 404s may happen and in this case, proxy would switch to alternative backend and keep using it for the remaining life time of this connection. Regards, Eduard. -- <wenz> quit <wenz> ~/quit -!- wenz [[email protected]] has quit [ircII2.8.2-EPIC3.004 --- Bloatware at its finest.] -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

