diff options
author | Michael Vogt <mvo@debian.org> | 2014-09-29 09:58:38 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2014-09-29 09:58:38 +0200 |
commit | 4c333a25a88b1afac2ed50bf1b9af61dc5b09343 (patch) | |
tree | d4b90a7bc46e9da364efb74365a0af604b38e424 /methods/copy.cc | |
parent | bca84917c326fa3158e120147c8aecebe0789b47 (diff) | |
parent | 6eb377fb9fba6b7f17f635143e9201f0d62a50fb (diff) |
Merge remote-tracking branch 'upstream/debian/experimental' into feature/acq-trans
Conflicts:
apt-pkg/acquire-item.cc
apt-pkg/acquire-item.h
methods/gpgv.cc
Diffstat (limited to 'methods/copy.cc')
-rw-r--r-- | methods/copy.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/methods/copy.cc b/methods/copy.cc index faf330ace..a23c0316c 100644 --- a/methods/copy.cc +++ b/methods/copy.cc @@ -37,15 +37,12 @@ class CopyMethod : public pkgAcqMethod void CopyMethod::CalculateHashes(FetchResult &Res) { - // For gzip indexes we need to look inside the gzip for the hash - // We can not use the extension here as its not used in partial - // on a IMS hit - FileFd::OpenMode OpenMode = FileFd::ReadOnly; + Hashes Hash; + FileFd::CompressMode CompressMode = FileFd::None; if (_config->FindB("Acquire::GzipIndexes", false) == true) - OpenMode = FileFd::ReadOnlyGzip; + CompressMode = FileFd::Extension; - Hashes Hash; - FileFd Fd(Res.Filename, OpenMode); + FileFd Fd(Res.Filename, FileFd::ReadOnly, CompressMode); Hash.AddFD(Fd); Res.TakeHashes(Hash); } @@ -128,6 +125,5 @@ int main() CopyMethod Mth; - Mth.DropPrivsOrDie(); return Mth.Run(); } |