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

Bug#966375: apt: Please provide an option to make "transient network errors" more detectable.



Package: apt
Version: 2.1.7
Priority: wishlist

Hi.

While managing systems, I sometimes want to make sure that an "apt update" actually fetches new index files. However, if the download fails with a 5xx error (and, I think if there already is an index file for that repository), then apt just outputs "Failed to fetch" from
https://salsa.debian.org/apt-team/apt/-/blob/master/apt-pkg/update.cc#L91 - unless I'm mistaken.

It would be great if there was a commandline option (or config option) which would tell apt to exit with some error code != 0 for the "apt update" case where one or more, but not necessarily all fetches of index files failed.

Note: I'm not sure exactly which errors count as transient, but for all I can tell, this is what we see: Transient errors not being exposed via the return code from "apt update". This leads to people not getting package updates when they would expect to get them because a custom repository was updated, but apt just failed a fetch without them noticing.

I might try to create a patch, but (a) I won't get around to that for another few weeks and (b) C/C++ aren't exactly my strong languages, so I'm not sure my patch would even be acceptable.

As a result I'm filing this as a wishlist bug in the hopes that someone with better knowledge gets around to implementing this before I have to.

Kind regards,
Sven

Reply to: