Hi,

As for truncated InRelease file, I decided to run apt-get update
multiple times until cached data are complete and neat  (No more
wget.).

Still, everytime I tried to install task-gnome-desktop to chroot, apt-
cacher-ng issues lots of errors after some downloads.  Let me focus on
avoiding this problem.

This looks like apt is doing something different than apt-cacher-ng for
fetching packages.  Intriguing...

Suspecting some kind of race condition, I slowed lo device to 1M
Byte/sec using "tc".  It slowed download but really didn't prevent 502
errors.  So fast connection via lo or virbr0 to apt-cacher-ng is not
the issue.

Then I looked at what it say on http://deb.debian.org

   Welcome to deb.debian.org (fastly instance)!
   This is deb.debian.org. This service provides mirrors for the following 
Debian archive repositories:
   
   /debian/
   /debian-debug/
   /debian-ports/
   /debian-security/
   The server deb.debian.org does not have packages itself, but the name has 
SRV records in DNS that let apt in stretch and later find places.
   
   To use it with a sufficiently recent apt, you for instance can put
   
   deb http://deb.debian.org/debian unstable main
   deb http://deb.debian.org/debian-debug unstable-debug main
   deb http://deb.debian.org/debian-ports unstable main
   in your sources.list.
   As of October 2016 the SRV record is
   
   _http._tcp.deb.debian.org.    IN      SRV     10 1 80 
prod.debian.map.fastly.net.
   _http._tcp.deb.debian.org.    IN      SRV     10 1 80 
dpvctowv9b08b.cloudfront.net.
   If you hit the server behind deb.debian.org directly, either because
   you use an older apt or because you use a HTTP proxy that does not
   support SRV records, your requests will get HTTP redirected to one
   of the CDN instances. If you want to avoid the redirects, you can
   pick one instance directly. For instance, this also works in your
   sources.list:
   deb http://cdn-fastly.deb.debian.org/debian stable main
   deb http://cdn-fastly.deb.debian.org/debian-security stable/updates main
   This service is sponsored by Fastly
   
Although I have no idea if apt-cacher-ng takes care SRV record, I changed 
chroot apt line and tested.

Wow, no more problem for downloading debs to install task-gnome-
desktop.

So, does apt-cacher-ng support SRV records?  Can it be taught easily?  

Or should we recommend to use cdn-fastly.deb.debian.org URL for apt
line.

Osamu

Reply via email to