Bug#812365: /usr/bin/apt-get: when download of a package list timeouts it is reported as Ign rather than Err

Kamil Ignacak <[email protected]>
Newsgroups gmane.linux.debian.apt.devel
Message-ID <ab26df0a-5579-45d0-a75f-7a7dd8694528__22571.2085420795$1742152172$gmane$org@wp.pl>
Hi!

Reproduction on bookworm with apt 2.6.1, with a mirror that is
configured (through iptables) to not respond:

root@debian:~# cat /etc/os-release | grep CODENAME
VERSION_CODENAME=bookworm
root@debian:~# apt --version
apt 2.6.1 (amd64)
root@debian:~# cat /etc/apt/sources.list
deb http://server.local.net/12 ./

root@debian:~#
root@debian:~# apt-get update
Ign:1 http://server.local.net/12 ./ InRelease
Ign:1 http://server.local.net/12 ./ InRelease
Ign:1 http://server.local.net/12 ./ InRelease
Err:1 http://server.local.net/12 ./ InRelease
   Could not connect to server.local.net:80 (192.168.0.28), connection 
timed out
Reading package lists... Done
W: Failed to fetch http://server.local.net/12/./InRelease  Could not 
connect to server.local.net:80 (192.168.0.28), connection timed out
W: Some index files failed to download. They have been ignored, or old 
ones used instead.
root@debian:~#



Reproduction on sid/trixie with apt 2.9.33, with a mirror that is
configured (through iptables) to not respond.

root@debian:~# cat /etc/os-release | grep CODENAME
VERSION_CODENAME=trixie
root@debian:~# apt --version
apt 2.9.33 (amd64)
root@debian:~# cat /etc/apt/sources.list
deb http://server.local.net/sid ./

root@debian:~# apt-get update
Ign:1 http://server.local.net/sid ./ InRelease
Ign:1 http://server.local.net/sid ./ InRelease
Ign:1 http://server.local.net/sid ./ InRelease
Err:1 http://server.local.net/sid ./ InRelease
   Could not connect to server.local.net:80 (192.168.0.28), connection 
timed out
   Unable to connect to server.local.net:http:
Reading package lists... Done
W: Failed to fetch http://server.local.net/sid/./InRelease  Unable to 
connect to server.local.net:http:
W: Some index files failed to download. They have been ignored, or old 
ones used instead.
N: Some sources can be modernized. Run 'apt modernize-sources' to do so.
root@debian:~#



In both cases the initial report from apt includes "Ign" prefix, but the
final line is using "Err" prefix to indicate that a timeout for specific
transaction has failed.

I'm not sure if this would be good enough for the reporter, so I went
back to apt 1.2 (rev 10aaf7cbf8) from reporter's last e-mail.



root@debian:~# cat /etc/os-release | grep CODENAME
VERSION_CODENAME=buster
root@debian:~# apt --version
apt 1.2 (amd64)
root@debian:~# cat /etc/apt/sources.list
deb http://server.local.net/10 ./

root@debian:~#
root@debian:~# apt-get update
Err:1 http://server.local.net/10 ./ InRelease
   Could not connect to server.local.net:80 (192.168.0.28), connection 
timed out
Reading package lists... Done
W: Failed to fetch http://server.local.net/10/./InRelease  Could not 
connect to server.local.net:80 (192.168.0.28), connection timed out
W: Some index files failed to download. They have been ignored, or old 
ones used instead.



In apt 1.2 there are no lines tagged with "Ign", while current versions
of apt tag some of timed-out downloads with "Ign" (but finally also
using "Err" tag). To me there is no clear conclusion whether this issue
is addressed or not in current versions of apt.

Kamil
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.