From 19e525aac9a802f452100884fa142c5dc68b2db6 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 9 Aug 2017 23:05:34 +0200 Subject: 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 --- apt-pkg/acquire-method.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apt-pkg/acquire-method.cc') 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"; -- cgit v1.2.3