summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-item.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-11-13 02:29:46 +0100
committerJulian Andres Klode <jak@debian.org>2017-02-22 16:53:45 +0100
commit8b32b53b58889488aafee8df82e87a6ed86e4848 (patch)
tree023ed8d16b607926040fa6fbedb103ceb7d0dcef /apt-pkg/acquire-item.h
parent4ea646933c5f829d698705dc3100cbc51210ac35 (diff)
get pdiff files from the same mirror as the index
In ad9416611ab83f7799f2dcb4bf7f3ef30e9fe6f8 we fall back to asking the original mirror (e.g. a redirector) if we do not get the expected result. This works for the indexes, but patches are a different beast and much simpler. Adding this fallback code here seems like overkill as they are usually right along their Index file, so actually forward the relevant settings to the patch items which fixes pdiff support combined with a redirector and partial mirrors as in such a situation the pdiff patches would be 404 and the complete index would be downloaded. (cherry picked from commit 5832913a49d4f7c75527264a935cc0ce00627f1d)
Diffstat (limited to 'apt-pkg/acquire-item.h')
-rw-r--r--apt-pkg/acquire-item.h34
1 files changed, 13 insertions, 21 deletions
diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h
index 26e1a1922..8be8801bf 100644
--- a/apt-pkg/acquire-item.h
+++ b/apt-pkg/acquire-item.h
@@ -779,7 +779,7 @@ struct APT_HIDDEN DiffInfo { /*{{{*/
*/
class APT_HIDDEN pkgAcqIndexMergeDiffs : public pkgAcqBaseIndex
{
- void * const d;
+ std::string const indexURI;
protected:
@@ -830,23 +830,19 @@ class APT_HIDDEN pkgAcqIndexMergeDiffs : public pkgAcqBaseIndex
/** \brief Create an index merge-diff item.
*
* \param Owner The pkgAcquire object that owns this item.
- *
- * \param URI The URI of the package index file being
- * reconstructed.
- *
- * \param URIDesc A long description of this item.
- *
- * \param ShortDesc A brief description of this item.
- *
+ * \param TransactionManager responsible for this item
+ * \param Target we intend to built via pdiff patching
+ * \param baseURI is the URI used for the Index, but stripped down to Target
+ * \param DiffInfo of the patch in question
* \param patch contains infos about the patch this item is supposed
* to download which were read from the index
- *
* \param allPatches contains all related items so that each item can
* check if it was the last one to complete the download step
*/
pkgAcqIndexMergeDiffs(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
- IndexTarget const &Target, DiffInfo const &patch,
- std::vector<pkgAcqIndexMergeDiffs*> const * const allPatches) APT_NONNULL(2, 3, 6);
+ IndexTarget const &Target, std::string const &indexUsedMirror,
+ std::string const &indexURI, DiffInfo const &patch,
+ std::vector<pkgAcqIndexMergeDiffs*> const * const allPatches) APT_NONNULL(2, 3, 8);
virtual ~pkgAcqIndexMergeDiffs();
};
/*}}}*/
@@ -863,7 +859,7 @@ class APT_HIDDEN pkgAcqIndexMergeDiffs : public pkgAcqBaseIndex
*/
class APT_HIDDEN pkgAcqIndexDiffs : public pkgAcqBaseIndex
{
- void * const d;
+ std::string const indexURI;
private:
@@ -943,20 +939,16 @@ class APT_HIDDEN pkgAcqIndexDiffs : public pkgAcqBaseIndex
* \a diffs is empty, or QueueNextDiff() otherwise.
*
* \param Owner The pkgAcquire object that owns this item.
- *
- * \param URI The URI of the package index file being
- * reconstructed.
- *
- * \param URIDesc A long description of this item.
- *
- * \param ShortDesc A brief description of this item.
- *
+ * \param TransactionManager responsible for this item
+ * \param Target we want to built via pdiff patching
+ * \param baseURI is the URI used for the Index, but stripped down to Target
* \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.
*/
pkgAcqIndexDiffs(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
IndexTarget const &Target,
+ std::string const &indexUsedMirror, std::string const &indexURI,
std::vector<DiffInfo> const &diffs=std::vector<DiffInfo>()) APT_NONNULL(2, 3);
virtual ~pkgAcqIndexDiffs();
};