[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#696335: This happens with 'apt' as well



Hi,

This bug is pretty annoying, because it makes it impossible to recover
from problems in a scriptable way. I thought maybe things would be
better in 'apt', but it turns out its still the case that you will get a
'0' result code:

root@muck:/home/micah# apt update
Hit:1 http://deb.leap.se/debian sid InRelease
Err:2 http://cdn.debian.net/debian lenny InRelease                         
  Cannot initiate the connection to cdn.debian.net:80 (2001:41c8:1000:21::21:35). - connect (101: Network is unreachable) [IP: 2001:41c8:1000:21::21:35 80]
Reading package lists... Done                  
Building dependency tree       
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://cdn.debian.net/debian/dists/lenny/InRelease  Cannot initiate the connection to cdn.debian.net:80 (2001:41c8:1000:21::21:35). - connect (101: Network is unreachable) [IP: 2001:41c8:1000:21::21:35 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@muck:/home/micah# echo $?
0
root@muck:/home/micah# 

The man page for apt(8) says this:

DIAGNOSTICS
       apt returns zero on normal operation, decimal 100 on error.

but that is not true because of this.

thanks!
micah


Reply to: