From 355e1aceac1dd05c4c7daf3420b09bd860fd169d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 27 Oct 2017 19:09:45 +0200 Subject: implement fallback to alternative URIs for all items For deb files we always supported falling back from one server to the other if one failed to download the deb, but that was hardwired in the handling of this specific item. Moving this alongside the retry infrastructure we can implement it for all items and allow methods to use this as well by providing additional URIs in a redirect. --- apt-pkg/acquire-item.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apt-pkg/acquire-item.h') diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index 7f5f75195..cf227d1b5 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -244,6 +244,9 @@ class pkgAcquire::Item : public WeakPointable /*{{{*/ APT_HIDDEN unsigned int &ModifyRetries(); // this is more a hack than a proper external interface, hence hidden APT_HIDDEN std::unordered_map &ModifyCustomFields(); + // this isn't the super nicest interface either… + APT_HIDDEN bool PopAlternativeURI(std::string &NewURI); + APT_HIDDEN void PushAlternativeURI(std::string &&NewURI, std::unordered_map &&fields, bool const at_the_back); /** \brief A "descriptive" URI-like string. * @@ -993,6 +996,7 @@ class pkgAcqArchive : public pkgAcquire::Item std::string &StoreFilename; /** \brief The next file for this version to try to download. */ + APT_DEPRECATED_MSG("Unused member") pkgCache::VerFileIterator Vf; /** \brief How many (more) times to try to find a new source from -- cgit v1.2.3