diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2007-07-30 17:47:05 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2007-07-30 17:47:05 +0200 |
commit | 8a8feb29265b3dfc27f82072563a641a7976752a (patch) | |
tree | db89900e4001c365c5ffe25761f280dd9601c0bf /apt-pkg/acquire-method.cc | |
parent | 9498d18252a848b06f281434c173cece967ebbf6 (diff) |
* apt-pkg/acquire-item.{cc,h}:
- rename "hash" into ExpectedHash in pkgAcqFile, pkgAcqIndex
- add missing HashSum() call to class pkgAcqIndex
- use the data provided by acquire-method (and send via the
{SHA256,SHA1,MD5Sum}-Hash tag when comparing the hash, this
avoids calculating the hash twice (just like old libapt)
* apt-pkg/acquire-method.cc:
- send MD5Sum-Hash tag to libapt to be consistant with
HashString::SupportedHashes()
* apt-pkg/acquire-worker.cc:
- check with "Owner->HashSum().HashType()" what hash the frontend
is expecting and pass it to pkgAcquireItem::Done() in the new
HashString format
- add some debugging output
* apt-pkg/contrib/hashes.cc:
- fix off-by-one error when constructing a HashString from a single
input string
* apt-pkg/contrib/hashes.h:
- add "HashType()" method
* apt-pkg/init.h, apt-pkg/makefile, methods/makefile:
- break ABI
Diffstat (limited to 'apt-pkg/acquire-method.cc')
-rw-r--r-- | apt-pkg/acquire-method.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc index 7dee7d3e7..bc29417f7 100644 --- a/apt-pkg/acquire-method.cc +++ b/apt-pkg/acquire-method.cc @@ -176,7 +176,10 @@ void pkgAcqMethod::URIDone(FetchResult &Res, FetchResult *Alt) TimeRFC1123(Res.LastModified).c_str()); if (Res.MD5Sum.empty() == false) + { End += snprintf(End,sizeof(S)-50 - (End - S),"MD5-Hash: %s\n",Res.MD5Sum.c_str()); + End += snprintf(End,sizeof(S)-50 - (End - S),"MD5Sum-Hash: %s\n",Res.MD5Sum.c_str()); + } if (Res.SHA1Sum.empty() == false) End += snprintf(End,sizeof(S)-50 - (End - S),"SHA1-Hash: %s\n",Res.SHA1Sum.c_str()); if (Res.SHA256Sum.empty() == false) |