This mostly seems to be working, but there's a problem in some edge cases. Let's say that a mirror is lagging a bit, so that archive.ubuntu.com has a given by-hash file but de.archive.ubuntu.com doesn't yet; /etc/apt-cacher-ng/backends_ubuntu has de.archive.ubuntu.com followed by archive.ubuntu.com, and there are the usual default Remap-* rules. In that case we see symptoms like this:
Answer for: http://archive.ubuntu.com/ubuntu/dists/xenial/main/source/by-hash/SHA256/8b81701065e3fa4957c5df3c6edc6a6f55301b7e20ac04d6a0aa19881b852320 HTTP/1.1 404 Not Found Content-Length: 0 Date: Tue Apr 12 10:20:02 2016 Server: Debian Apt-Cacher NG/0.8.9 X-Original-Source: http://de.archive.ubuntu.com/ubuntu/dists/xenial/main/source/by-hash/SHA256/8b81701065e3fa4957c5df3c6edc6a6f55301b7e20ac04d6a0aa19881b852320 Connection: Keep-Alive The unfortunate thing is that this 404 means that apt switches to its fallback behaviour of fetching the old by-name version of the file (http://archive.ubuntu.com/ubuntu/dists/xenial/main/source/Sources.xz in this case), and since we're already in a situation of skewed mirrors this tends to result in a hash sum mismatch as in the bad old days. I think we want the default for by-hash files to be that it will try other mirrors rather than responding with the 404 from the first one. Do you agree, and if so how should that be achieved? -- Colin Watson [[email protected]]

