summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2017-08-09 23:05:34 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2017-10-05 17:30:25 +0200
commit19e525aac9a802f452100884fa142c5dc68b2db6 (patch)
tree78277b97fd0c9fb550dd470b4eb6d1bf298da655
parentd006da196dd4289ab3667817d218e6c6ac7bdb6b (diff)
send the hashes for alternative file correctly
This isn't really used by the acquire system at all at the moment and the only method potentially sending this information is file://, but that used to be working correctly before broken in 2013, so better fix it now and worry about maybe using the data some day later. Regression-Of: b3501edb7091ca3aa6c2d6d96dc667b8161dd2b9
-rw-r--r--apt-pkg/acquire-method.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc
index 058ec7945..5b31559f3 100644
--- a/apt-pkg/acquire-method.cc
+++ b/apt-pkg/acquire-method.cc
@@ -173,13 +173,13 @@ void pkgAcqMethod::URIStart(FetchResult &Res)
// AcqMethod::URIDone - A URI is finished /*{{{*/
// ---------------------------------------------------------------------
/* */
-static void printHashStringList(HashStringList const * const list)
+static void printHashStringList(char const *const Prefix, HashStringList const *const list)
{
for (HashStringList::const_iterator hash = list->begin(); hash != list->end(); ++hash)
{
// very old compatibility name for MD5Sum
if (hash->HashType() == "MD5Sum")
- std::cout << "MD5-Hash: " << hash->HashValue() << "\n";
+ std::cout << Prefix << "MD5-Hash: " << hash->HashValue() << "\n";
std::cout << hash->HashType() << "-Hash: " << hash->HashValue() << "\n";
}
}
@@ -200,7 +200,7 @@ void pkgAcqMethod::URIDone(FetchResult &Res, FetchResult *Alt)
if (Res.LastModified != 0)
std::cout << "Last-Modified: " << TimeRFC1123(Res.LastModified, true) << "\n";
- printHashStringList(&Res.Hashes);
+ printHashStringList("", &Res.Hashes);
if (UsedMirror.empty() == false)
std::cout << "UsedMirror: " << UsedMirror << "\n";
@@ -229,7 +229,7 @@ void pkgAcqMethod::URIDone(FetchResult &Res, FetchResult *Alt)
if (Alt->LastModified != 0)
std::cout << "Alt-Last-Modified: " << TimeRFC1123(Alt->LastModified, true) << "\n";
- printHashStringList(&Alt->Hashes);
+ printHashStringList("Alt-", &Alt->Hashes);
if (Alt->IMSHit == true)
std::cout << "Alt-IMS-Hit: true\n";