From 2d6c6c8809c7b4c1a009df48387ba15066fda7e2 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 14 Jan 2018 00:07:20 +0100 Subject: Drop alternative URIs we got a hash-based fail from If we got a file but it produced a hash error, mismatched size or similar we shouldn't fallback to alternative URIs as they likely result in the same error. If we can we should instead use another mirror. We used to be a lot stricter by stopping all trys for this file if we got a non-404 (or a hash-based) failure, but that is too hard as we really want to try other mirrors (if we have them) in the hope that they have the expected and correct files. --- test/integration/test-partial-file-support | 2 +- test/integration/test-pdiff-usage | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/integration/test-partial-file-support b/test/integration/test-partial-file-support index 9b5eed1e5..88fa91324 100755 --- a/test/integration/test-partial-file-support +++ b/test/integration/test-partial-file-support @@ -24,7 +24,7 @@ testdownloadfile() { else msgpass fi - sed -e '/^ <- / s#%20# #g' -e '/^ <- / s#%0a#\n#g' "$DOWNLOADLOG" | grep '^.*-Hash: ' > receivedhashes.log + sed -e '/^ <- / s#%20# #g' -e '/^ <- / s#%0a#\n#g' "$DOWNLOADLOG" | grep '^.*-Hash: ' > receivedhashes.log || true testsuccess test -s receivedhashes.log local HASHES_OK=0 local HASHES_BAD=0 diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage index 5a650ad83..eec384573 100755 --- a/test/integration/test-pdiff-usage +++ b/test/integration/test-pdiff-usage @@ -398,7 +398,8 @@ testcase -o Acquire::IndexTargets::deb::Packages::KeepCompressed=true partialleftovers() { generatepartialleftovers "redirectme_Packages.${LOWCOSTEXT}" "redirectme_Packages-patched.${LOWCOSTEXT}"; } -webserverconfig 'aptwebserver::redirect::replace::/redirectme/' "http://0.0.0.0:${APTHTTPPORT}/" +# redirect the InRelease file only – the other files are auto-redirected by apt +webserverconfig 'aptwebserver::redirect::replace::/redirectme/I' "http://0.0.0.0:${APTHTTPPORT}/I" rewritesourceslist "http://localhost:${APTHTTPPORT}/redirectme" aptautotest_apt_update() { aptautotest_aptget_update "$@" -- cgit v1.2.3