]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/update.cc
drop confusing comma from no strong hash message
[apt.git] / apt-pkg / update.cc
index 2908a4820ba23b115363acd499e1494f2eb4068a..ca87c6976a0025868b7b96708481ac844a115932 100644 (file)
@@ -11,7 +11,6 @@
 #include <apt-pkg/update.h>
 
 #include <string>
-#include <vector>
 
 #include <apti18n.h>
                                                                        /*}}}*/
@@ -74,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\n"), 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;