diff options
author | David Kalnischkies <david@kalnischkies.de> | 2014-09-29 22:45:52 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2014-09-30 01:53:47 +0200 |
commit | f6d4ab9ad8a2cfe52737ab620dd252cf8ceec43d (patch) | |
tree | 282df83623c80846711fba7df748a69131d5b864 /apt-pkg/contrib | |
parent | 3809194b662f48733916e6248cd0c141f281313d (diff) |
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.
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r-- | apt-pkg/contrib/hashes.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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) |