diff options
author | David Kalnischkies <david@kalnischkies.de> | 2017-10-27 19:09:45 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2017-12-13 23:56:29 +0100 |
commit | 355e1aceac1dd05c4c7daf3420b09bd860fd169d (patch) | |
tree | 6d71c3b920209bc6636893f34f6e619418bd719b /apt-pkg/acquire-item.h | |
parent | 9f572c0a6d13cc983a4f8880a3dee3a8e46604bb (diff) |
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.
Diffstat (limited to 'apt-pkg/acquire-item.h')
-rw-r--r-- | apt-pkg/acquire-item.h | 4 |
1 files changed, 4 insertions, 0 deletions
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<std::string, std::string> &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<std::string, std::string> &&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 |