From 3809194b662f48733916e6248cd0c141f281313d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 29 Sep 2014 15:41:12 +0200 Subject: mark private methods as hidden We are the only possible users of private methods, so we are also the only users who can potentially export them via using them in inline methods. The point is: We don't need these symbols exported if we don't do this, so marking them as hidden removes some methods from the API without breaking anything as nobody could have used them. Git-Dch: Ignore --- apt-pkg/acquire-item.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg/acquire-item.h') diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index 74b5de675..513c516cd 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -576,7 +576,7 @@ class pkgAcqIndexDiffs : public pkgAcqBaseIndex * \return \b true if an applicable diff was found, \b false * otherwise. */ - bool QueueNextDiff(); + APT_HIDDEN bool QueueNextDiff(); /** \brief Handle tasks that must be performed after the item * finishes downloading. @@ -589,7 +589,7 @@ class pkgAcqIndexDiffs : public pkgAcqBaseIndex * \param allDone If \b true, the file was entirely reconstructed, * and its md5sum is verified. */ - void Finish(bool allDone=false); + APT_HIDDEN void Finish(bool allDone=false); protected: -- cgit v1.2.3 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/acquire-item.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'apt-pkg/acquire-item.h') diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index 513c516cd..18d72ca40 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -328,11 +328,17 @@ struct DiffInfo { /** The filename of the diff. */ std::string file; - /** The sha1 hash of the diff. */ - std::string sha1; + /** The hashes of the diff */ + HashStringList result_hashes; - /** The size of the diff. */ - unsigned long size; + /** The hashes of the file after the diff is applied */ + HashStringList patch_hashes; + + /** The size of the file after the diff is applied */ + unsigned long long result_size; + + /** The size of the diff itself */ + unsigned long long patch_size; }; /*}}}*/ /** \brief An item that is responsible for fetching a SubIndex {{{ @@ -616,9 +622,6 @@ class pkgAcqIndexDiffs : public pkgAcqBaseIndex */ std::vector available_patches; - /** Stop applying patches when reaching that sha1 */ - std::string ServerSha1; - /** The current status of this patch. */ enum DiffState { @@ -662,12 +665,10 @@ class pkgAcqIndexDiffs : public pkgAcqBaseIndex * * \param ShortDesc A brief description of this item. * - * \param ExpectedHashes The expected md5sum of the completely + * \param ExpectedHashes The expected hashsums of the completely * reconstructed package index file; the index file will be tested * against this value when it is entirely reconstructed. * - * \param ServerSha1 is the sha1sum of the current file on the server - * * \param diffs The remaining diffs from the index of diffs. They * should be ordered so that each diff appears before any diff * that depends on it. @@ -676,7 +677,6 @@ class pkgAcqIndexDiffs : public pkgAcqBaseIndex struct IndexTarget const * const Target, HashStringList const &ExpectedHash, indexRecords *MetaIndexParser, - std::string ServerSha1, std::vector diffs=std::vector()); }; /*}}}*/ -- cgit v1.2.3