On Sat, Feb 06, 2021 at 08:55:41PM +0100, Francesco P. Lovergine wrote:
Sorry for the long delay, your answer has been probably victim of my antispam systems.

First of all, I managed to still reproduce the issue with my current sid chroot in buster. Something changed, because now the delays appears only
the first time after purge and reinstall of auto-apt-proxy apparently.
Then it can run again in the same schroot session without delay... until the next schroot session and then again: it delays at the first run only :-(

Here it is the run of the command you requested:

00:00:00 + [ 204 -gt 60 ]
00:00:00 + rm -f /tmp/.auto-apt-proxy-1000/cache
00:00:00 + [ -f /tmp/.auto-apt-proxy-1000/cache ]
00:00:00 + __detect__
00:00:00 + detect_DNS_SRV_record
00:00:00 + + shuf
00:00:00 hostname --domain
00:00:00 + awk /^[^#]/{print "http://"; $1 ":" $4;found=1;exit}END{exit !found}
00:00:00 + /usr/lib/apt/apt-helper srv-lookup _apt_proxy._tcp.lovergine.com
00:00:00 + command -v ip
00:00:00 + ip route
00:00:00 + awk /default/ { print($3) }
00:00:00 + gateway=192.168.1.1
00:00:00 + getent hosts apt-proxy
00:00:00 + awk /[:blank:]/ { print($1) }
00:00:29 + explicit_proxy=                                                         
                                     <----- HERE!?
00:00:00 + detect_apt_cacher_ng 127.0.0.1
00:00:00 + local ip=127.0.0.1
00:00:00 + local proxy=http://127.0.0.1:3142
00:00:00 + hit -o Acquire::http::Proxy::127.0.0.1=DIRECT http://127.0.0.1:3142
00:00:00 + timeout 5 /usr/lib/apt/apt-helper -o Acquire::http::Proxy=DIRECT 
download-file -o Acquire::http::Proxy::127.0.0.1=DIRECT http://127.0.0.1:3142 
/tmp/tmp.hr4l6p
hnyH
00:00:00 + grep -q -i 406.*usage.information
00:00:00 + echo http://127.0.0.1:3142
00:00:00 + return 0
00:00:00 + return 0
00:00:00 + cat /tmp/.auto-apt-proxy-1000/cache
00:00:00 http://127.0.0.1:3142
00:00:00 + cleanup
00:00:00 + rm -f /tmp/tmp.hr4l6phnyH

real    0m28.218s
user    0m0.049s
sys     0m0.021s
(sid)frankie@aragorn:~
$


Another box, in this case a bullseye that host a buster chroot:

(buster)frankie@klecker:~
$ time auto-apt-proxy http://127.0.0.1:3142

real    1m0.139s
user    0m0.068s
sys     0m0.000s

The cache system is apt-cacher in that case. And the delay is present at each invocation. Note that this box lives in another network (other DNS servers, different domain, different interfaces and so on).

--
Francesco P. Lovergine

Reply via email to