#776774 apt: Don't throw away cronjob stderr output on regular verbosity levels

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
Wolfgang Karall
Date:
2015-02-01 16:12:06 UTC
Severity:
important
#776774#5
Date:
2015-02-01 16:03:39 UTC
From:
To:
Hello,

when using the /etc/cron.daily/apt cronjob with APT::Periodic::Verbose
set to anything below 3 it's basically impossible to catch errors
because stderr output is thrown away (XSTDERR="2>/dev/null" which is
used at various apt-get commands later on).

Unfortunately this also means that all errors from apt-get update get
discarded, which in turn means that no metadata update happens, ever.

To reproduce, just configure APT to use a non-existing proxy like for
example

Acquire::http::Proxy "http://localhost:48080";

and run the cronjob (of course having enabled APT::Periodic in the
APT config). The cronjob will happily exit with 0 and not produce any
output.

Cheers
Wolfgang

PS: Obviously it's also questionable if it's the right thing to do for
apt-get update to exit with 0 when not a single configured repository
can be reached.