diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2010-08-21 22:19:56 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2010-08-21 22:19:56 +0200 |
commit | f213b6ea7397f2ba5b770e1a30e57dc8438bf61e (patch) | |
tree | 890973d4e2c0104ed58fb9d31b2e7194b76c6568 /apt-pkg/acquire-item.cc | |
parent | de2b1358926d293c85277e1d9a58ac94915470ec (diff) |
* apt-pkg/acquire-item.cc:
- don't use ReadOnlyGzip mode for PDiffs as this mode doesn't work
in combination with the AddFd methods of our hashclasses
Add also 2 testcases: one to test pdiffs in general and
one to test the handling of compressed indexes.
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r-- | apt-pkg/acquire-item.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index a289fb7ba..752bc6a99 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -280,7 +280,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/ ss >> ServerSha1 >> size; unsigned long const ServerSize = atol(size.c_str()); - FileFd fd(CurrentPackagesFile, FileFd::ReadOnlyGzip); + FileFd fd(CurrentPackagesFile, FileFd::ReadOnly); SHA1Summation SHA1; SHA1.AddFD(fd.Fd(), fd.Size()); string const local_sha1 = SHA1.Result(); @@ -297,7 +297,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/ else { if(Debug) - std::clog << "SHA1-Current: " << ServerSha1 << std::endl; + std::clog << "SHA1-Current: " << ServerSha1 << " and we start at "<< fd.Name() << " " << fd.Size() << " " << local_sha1 << std::endl; // check the historie and see what patches we need string const history = Tags.FindS("SHA1-History"); @@ -511,7 +511,7 @@ bool pkgAcqIndexDiffs::QueueNextDiff() /*{{{*/ string FinalFile = _config->FindDir("Dir::State::lists"); FinalFile += URItoFileName(RealURI); - FileFd fd(FinalFile, FileFd::ReadOnlyGzip); + FileFd fd(FinalFile, FileFd::ReadOnly); SHA1Summation SHA1; SHA1.AddFD(fd.Fd(), fd.Size()); string local_sha1 = string(SHA1.Result()); |