summaryrefslogtreecommitdiff
path: root/apt-pkg/update.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-03-16 16:46:39 +0100
committerJulian Andres Klode <jak@debian.org>2016-03-16 17:56:50 +0100
commitf695e76199a43b7f4d5816e20d18496b6448b833 (patch)
treeb7901f1620a15e630e47d6b0e2c438a76a9e9e8f /apt-pkg/update.cc
parentfb193b1cd43f0e8c3b7e5f69f183b9abe7e83761 (diff)
Report non-transient errors as errors, not as warnings
This makes it easier to understand what really is an error and what not.
Diffstat (limited to 'apt-pkg/update.cc')
-rw-r--r--apt-pkg/update.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/apt-pkg/update.cc b/apt-pkg/update.cc
index 369e85122..ca87c6976 100644
--- a/apt-pkg/update.cc
+++ b/apt-pkg/update.cc
@@ -73,9 +73,13 @@ bool AcquireUpdate(pkgAcquire &Fetcher, int const PulseInterval,
uri.User.clear();
uri.Password.clear();
string descUri = string(uri);
- _error->Warning(_("Failed to fetch %s %s"), descUri.c_str(),
- (*I)->ErrorText.c_str());
-
+ // Show an error for non-transient failures, otherwise only warn
+ if ((*I)->Status == pkgAcquire::Item::StatTransientNetworkError)
+ _error->Warning(_("Failed to fetch %s %s"), descUri.c_str(),
+ (*I)->ErrorText.c_str());
+ else
+ _error->Error(_("Failed to fetch %s %s"), descUri.c_str(),
+ (*I)->ErrorText.c_str());
if ((*I)->Status == pkgAcquire::Item::StatTransientNetworkError)
{
TransientNetworkFailure = true;