From 9b8034a9fd40b4d05075fda719e61f6eb4c45678 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 16 Apr 2016 00:07:28 +0200 Subject: use the same redirection mirror for all index files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Redirection services like httpredir.debian.org tend to use a set of mirrors from which they pick a mirror at "random" for each requested file, which is usually benefitial for the download of debs, but for the index files this can quickly cause problems (aka hashsum mismatches) if the two (or more) mirrors involved are only slightly out-of-sync. This commit "resolves" this issue by using the mirror we ended up using to get the (signed) Release file directly to get the index files belonging to this Release file instead of asking the redirection service which eliminates the risk of hitting out-of-sync mirrors. As an obvious downside the redirection service can't serve partial mirrors anymore for indexes and the download of indexes indexed in the same Release file can't be done in parallel (from different mirrors). This does not effect the download of non-index files like deb-files as out-of-sync mirrors aren't a huge problem there, so the parallel download outweights a potentially 404 error (also because this causes no errenous downloads while hashsum mismatches download the entire file before finding out that it was pointless). The rational for this is that indexes are relative to the Release file. If we would be talking about a HTML page including images, such a behaviour is obvious and intended – not doing it means in the best case a bunch of "useless" requests which will all be answered with a redirect. --- apt-pkg/acquire-item.h | 1 + 1 file changed, 1 insertion(+) (limited to 'apt-pkg/acquire-item.h') diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index 61037f1b7..41420a7c1 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -469,6 +469,7 @@ class APT_HIDDEN pkgAcqMetaBase : public pkgAcqTransactionItem /*{{{*/ // This refers more to the Transaction-Manager than the actual file bool IMSHit; TransactionStates State; + std::string BaseURI; virtual bool QueueURI(pkgAcquire::ItemDesc &Item) APT_OVERRIDE; virtual HashStringList GetExpectedHashes() const APT_OVERRIDE; -- cgit v1.2.3-70-g09d2