I find this bites me when debootstrapping a new machine.  For the 
benefit of anyone else having problems with this setup (I'm using 
apt-proxy 1.9.25) and determined to use a local proxy, the following 
workaround solved it for me...

--read-timeout=1 tells wget to time out after 1 second waiting on data 
from the proxy.  Wget is happy that it has the full file (the length of 
data received matches the Content-Length header) so AFAICS it just 
expects the broken proxy to close the connection, which apt-proxy won't 
do.  This option effectively makes Wget close the connection on behalf 
of the broken proxy.  (I tried setting Wget's --no-http-keep-alive and 
also tried setting apt-proxy's disable_pipelining to 1, but neither of 
these worked.)

It's not pretty (you get a 1s delay per request) but it works.  When 
debootstrapping a machine from a Knoppix 3.6 CD, I did this:

cp -a /usr/lib/debootstrap /ramdisk/newdebootstrap
sed -i -e 's/wget /wget --read-timeout=1 /' \
  /ramdisk/newdebootstrap/functions
mount --bind /ramdisk/newdebootstrap /usr/lib/debootstrap
debootstrap ...

Hope this helps someone.

From my idle inspection of the apt-proxy and twisted framework source, 
the problem would appear to lie in the twisted framework, not 
apt-proxy, but ICBW.

Isaac Wilcox

Reply via email to