X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/2651f1c071927b7fc440ec7a638ecad7ccf04a2e..173fa882cf3396ab6d2a9be53c6ea23eda225a1d:/apt-pkg/acquire-method.cc diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc index d0eb01bbc..39d5e61f2 100644 --- a/apt-pkg/acquire-method.cc +++ b/apt-pkg/acquire-method.cc @@ -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 /*{{{*/ @@ -145,13 +156,13 @@ void pkgAcqMethod::URIStart(FetchResult &Res) std::cout << "200 URI Start\n" << "URI: " << Queue->Uri << "\n"; if (Res.Size != 0) - std::cout << "Size: " << Res.Size << "\n"; + std::cout << "Size: " << std::to_string(Res.Size) << "\n"; if (Res.LastModified != 0) - std::cout << "Last-Modified: " << TimeRFC1123(Res.LastModified) << "\n"; + std::cout << "Last-Modified: " << TimeRFC1123(Res.LastModified, true) << "\n"; if (Res.ResumePoint != 0) - std::cout << "Resume-Point: " << Res.ResumePoint << "\n"; + std::cout << "Resume-Point: " << std::to_string(Res.ResumePoint) << "\n"; if (UsedMirror.empty() == false) std::cout << "UsedMirror: " << UsedMirror << "\n"; @@ -184,10 +195,10 @@ void pkgAcqMethod::URIDone(FetchResult &Res, FetchResult *Alt) std::cout << "Filename: " << Res.Filename << "\n"; if (Res.Size != 0) - std::cout << "Size: " << Res.Size << "\n"; + std::cout << "Size: " << std::to_string(Res.Size) << "\n"; if (Res.LastModified != 0) - std::cout << "Last-Modified: " << TimeRFC1123(Res.LastModified) << "\n"; + std::cout << "Last-Modified: " << TimeRFC1123(Res.LastModified, true) << "\n"; printHashStringList(&Res.Hashes); @@ -202,7 +213,7 @@ void pkgAcqMethod::URIDone(FetchResult &Res, FetchResult *Alt) } if (Res.ResumePoint != 0) - std::cout << "Resume-Point: " << Res.ResumePoint << "\n"; + std::cout << "Resume-Point: " << std::to_string(Res.ResumePoint) << "\n"; if (Res.IMSHit == true) std::cout << "IMS-Hit: true\n"; @@ -213,10 +224,10 @@ void pkgAcqMethod::URIDone(FetchResult &Res, FetchResult *Alt) std::cout << "Alt-Filename: " << Alt->Filename << "\n"; if (Alt->Size != 0) - std::cout << "Alt-Size: " << Alt->Size << "\n"; + std::cout << "Alt-Size: " << std::to_string(Alt->Size) << "\n"; if (Alt->LastModified != 0) - std::cout << "Alt-Last-Modified: " << TimeRFC1123(Alt->LastModified) << "\n"; + std::cout << "Alt-Last-Modified: " << TimeRFC1123(Alt->LastModified, true) << "\n"; printHashStringList(&Alt->Hashes);