From f6d4ab9ad8a2cfe52737ab620dd252cf8ceec43d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 29 Sep 2014 22:45:52 +0200 Subject: support parsing of all hashes for pdiff The fileformat of a pdiff index stores currently only SHA1 hashes. With this change, we look for all other hashes we support as well and take what we get, so that we can work after the release of jessie to get right of SHA1 if we want to. Note that the completely patched file is and was checked against the hashes collected from the Release file, so this transition isn't mission critical. --- apt-pkg/contrib/hashes.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg/contrib/hashes.cc') diff --git a/apt-pkg/contrib/hashes.cc b/apt-pkg/contrib/hashes.cc index 199e395f6..417982343 100644 --- a/apt-pkg/contrib/hashes.cc +++ b/apt-pkg/contrib/hashes.cc @@ -209,11 +209,11 @@ bool HashStringList::operator==(HashStringList const &other) const /*{{{*/ std::string const forcedType = _config->Find("Acquire::ForceHash", ""); if (forcedType.empty() == false) { - HashString const * const hs = other.find(forcedType); + HashString const * const hs = find(forcedType); HashString const * const ohs = other.find(forcedType); if (hs == NULL || ohs == NULL) return false; - return hs == ohs; + return *hs == *ohs; } short matches = 0; for (const_iterator hs = begin(); hs != end(); ++hs) -- cgit v1.2.3