From 188f297a2af4c15cb1d502360d1e478644b5b810 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 28 May 2017 22:26:17 +0200 Subject: 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). --- apt-pkg/acquire-item.h | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'apt-pkg/acquire-item.h') 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 * diffs; + std::vector 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. * -- cgit v1.2.3