]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire-method.cc
implement generic config fallback for methods
[apt.git] / apt-pkg / acquire-method.cc
index a9fff661b49fe08741287fa2d9d09111f17ba857..39d5e61f2acb1ab10d4009f9bad60bfa26672fa5 100644 (file)
@@ -80,9 +80,20 @@ void pkgAcqMethod::Fail(bool Transient)
 {
    string Err = "Undetermined Error";
    if (_error->empty() == false)
-      _error->PopMessage(Err);   
-   _error->Discard();
-   Fail(Err,Transient);
+   {
+      Err.clear();
+      while (_error->empty() == false)
+      {
+        std::string msg;
+        if (_error->PopMessage(msg))
+        {
+           if (Err.empty() == false)
+              Err.append("\n");
+           Err.append(msg);
+        }
+      }
+   }
+   Fail(Err, Transient);
 }
                                                                        /*}}}*/
 // AcqMethod::Fail - A fetch has failed                                        /*{{{*/