On Thu, Feb 18, 2021 at 09:20:44AM -0500, Scott Moser wrote: > On Thu, Feb 11, 2021 at 5:14 AM Julian Andres Klode > <julian.kl...@canonical.com> wrote: > > > > I just realized I did not yet widely advertise that hirsute has a new > > --error-on=any argument for apt{,-get} update that makes it also > > consider transient errors as errors instead of warnings. > > > > I think a bunch of people asked for that in the past because they > > implemented retry loops around that for like container startup. > > > > --error-on maps to the configuration option APT::Update::Error-Mode, > > for folks who want to drop that into apt.conf or who need to pass it > > unconditionally and keep older apts working, they can do -o > > APT::Update::Error-Mode=any > > > > The patch is not big, I guess we can SRU it if we want to. > > Hi, > I just stumbled across this in practice on 20.04 and found this email. > What is the recommended way to have `apt-get update` exit failure when > something fails on 20.04 and 18.04 ?
Nothing is available in older releases yet, it's hard to figure out if you actually succeeded fetching everything or if everything failed to DNS resolve or stuff. I thought cloud-init had a hack for that, but maybe I'm wrong / was just wishfully thinking. I've queued it for the upcoming microreleases of apt, this will go back to 18.04, not convinced I want to do a "final" update for 16.04. -- debian developer - deb.li/jak | jak-linux.org - free software dev ubuntu core developer i speak de, en -- ubuntu-devel mailing list ubuntu-devel@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel