diff options
author | David Kalnischkies <david@kalnischkies.de> | 2017-05-28 22:26:17 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2017-06-26 23:31:15 +0200 |
commit | 188f297a2af4c15cb1d502360d1e478644b5b810 (patch) | |
tree | 4063f8442876359787efe907ac9dbdd86d97fdea /apt-pkg/acquire-item.h | |
parent | d7c92411dc1f4c6be098d1425f9c1c075e0c2154 (diff) |
show .diff/Index properly as ignored if we fallback
Moving the code responsible for parsing the Index file from ::Done into
the slightly earlier ::VerifyDone allows us to still "fail" the download
if we can't make use of the Index for whatever reason, so that the
progress log correctly displays "Ign" instead of "Get" for the file.
This also makes quiet a few debug messages proper error messages (but
those are still hidden by default for Ign lines).
Diffstat (limited to 'apt-pkg/acquire-item.h')
-rw-r--r-- | apt-pkg/acquire-item.h | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index 7741dbf22..343144122 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -686,6 +686,20 @@ class APT_HIDDEN pkgAcqIndex : public pkgAcqBaseIndex std::string const &Message, pkgAcquire::MethodConfig const * const Cnf); }; /*}}}*/ +struct APT_HIDDEN DiffInfo { /*{{{*/ + /** The filename of the diff. */ + std::string file; + + /** The hashes of the file after the diff is applied */ + HashStringList result_hashes; + + /** The hashes of the diff */ + HashStringList patch_hashes; + + /** The hashes of the compressed diff */ + HashStringList download_hashes; +}; + /*}}}*/ /** \brief An item that is responsible for fetching an index file of {{{ * package list diffs and starting the package list's download. * @@ -699,6 +713,8 @@ class APT_HIDDEN pkgAcqDiffIndex : public pkgAcqIndex { void * const d; std::vector<pkgAcqIndexMergeDiffs*> * diffs; + std::vector<DiffInfo> available_patches; + bool pdiff_merge; protected: /** \brief If \b true, debugging information will be written to std::clog. */ @@ -718,6 +734,7 @@ class APT_HIDDEN pkgAcqDiffIndex : public pkgAcqIndex public: // Specialized action members virtual void Failed(std::string const &Message, pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE; + virtual bool VerifyDone(std::string const &Message, pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE; virtual void Done(std::string const &Message, HashStringList const &Hashes, pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE; virtual std::string DescURI() const APT_OVERRIDE {return Target.URI + "Index";}; @@ -752,20 +769,6 @@ class APT_HIDDEN pkgAcqDiffIndex : public pkgAcqIndex APT_HIDDEN void QueueOnIMSHit() const; }; /*}}}*/ -struct APT_HIDDEN DiffInfo { /*{{{*/ - /** The filename of the diff. */ - std::string file; - - /** The hashes of the file after the diff is applied */ - HashStringList result_hashes; - - /** The hashes of the diff */ - HashStringList patch_hashes; - - /** The hashes of the compressed diff */ - HashStringList download_hashes; -}; - /*}}}*/ /** \brief An item that is responsible for fetching client-merge patches {{{ * that need to be applied to a given package index file. * |