summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-method.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/acquire-method.cc')
-rw-r--r--apt-pkg/acquire-method.cc19
1 files changed, 11 insertions, 8 deletions
diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc
index e9e102488..1ae139b40 100644
--- a/apt-pkg/acquire-method.cc
+++ b/apt-pkg/acquire-method.cc
@@ -15,6 +15,8 @@
##################################################################### */
/*}}}*/
// Include Files /*{{{*/
+#include <config.h>
+
#include <apt-pkg/acquire-method.h>
#include <apt-pkg/error.h>
#include <apt-pkg/configuration.h>
@@ -81,7 +83,7 @@ void pkgAcqMethod::Fail(bool Transient)
void pkgAcqMethod::Fail(string Err,bool Transient)
{
// Strip out junk from the error messages
- for (string::iterator I = Err.begin(); I != Err.end(); I++)
+ for (string::iterator I = Err.begin(); I != Err.end(); ++I)
{
if (*I == '\r')
*I = ' ';
@@ -166,6 +168,8 @@ void pkgAcqMethod::URIDone(FetchResult &Res, FetchResult *Alt)
std::cout << "SHA1-Hash: " << Res.SHA1Sum << "\n";
if (Res.SHA256Sum.empty() == false)
std::cout << "SHA256-Hash: " << Res.SHA256Sum << "\n";
+ if (Res.SHA512Sum.empty() == false)
+ std::cout << "SHA512-Hash: " << Res.SHA512Sum << "\n";
if (UsedMirror.empty() == false)
std::cout << "UsedMirror: " << UsedMirror << "\n";
if (Res.GPGVOutput.empty() == false)
@@ -199,7 +203,9 @@ void pkgAcqMethod::URIDone(FetchResult &Res, FetchResult *Alt)
std::cout << "Alt-SHA1-Hash: " << Alt->SHA1Sum << "\n";
if (Alt->SHA256Sum.empty() == false)
std::cout << "Alt-SHA256-Hash: " << Alt->SHA256Sum << "\n";
-
+ if (Alt->SHA512Sum.empty() == false)
+ std::cout << "Alt-SHA512-Hash: " << Alt->SHA512Sum << "\n";
+
if (Alt->IMSHit == true)
std::cout << "Alt-IMS-Hit: true\n";
}
@@ -421,12 +427,8 @@ void pkgAcqMethod::Status(const char *Format,...)
to keep the pipeline synchronized. */
void pkgAcqMethod::Redirect(const string &NewURI)
{
- std::cout << "103 Redirect\nURI: ";
- if (Queue != 0)
- std::cout << Queue->Uri << "\n";
- else
- std::cout << "<UNKNOWN>\n";
- std::cout << "New-URI: " << NewURI << "\n"
+ std::cout << "103 Redirect\nURI: " << Queue->Uri << "\n"
+ << "New-URI: " << NewURI << "\n"
<< "\n" << std::flush;
// Change the URI for the request.
@@ -460,5 +462,6 @@ void pkgAcqMethod::FetchResult::TakeHashes(Hashes &Hash)
MD5Sum = Hash.MD5.Result();
SHA1Sum = Hash.SHA1.Result();
SHA256Sum = Hash.SHA256.Result();
+ SHA512Sum = Hash.SHA512.Result();
}
/*}}}*/