From 2a81f98b124d8fe551b160df55db1d3bf79a77c1 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 6 Mar 2021 16:11:34 +0100 Subject: Ensure all index files sent custom tags to the methods MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The mirror method can distribute requests for files based on various metadata bits, but some – the main index files – weren't actually passing those on to the methods as advertised in the manpage. This is hidden both by mirror usually falling back to other sources which will eventually hit the right one and that if the repository does not support by-hash apt will automatically stick to the mirror which was used for the Release file. --- test/integration/test-method-mirror | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') diff --git a/test/integration/test-method-mirror b/test/integration/test-method-mirror index 56c9a10a0..81a5585fd 100755 --- a/test/integration/test-method-mirror +++ b/test/integration/test-method-mirror @@ -192,6 +192,16 @@ http://localhost:${APTHTTPPORT}/redirectme type:deb testfailure apt update testrundownload 'foo=2' +msgmsg 'Mirrors can be filtered by' 'by-hash type' +echo "http://localhost:${APTHTTPPORT}/failure type:foobar priority:1 +http://localhost:${APTHTTPPORT}/redirectme type:index type:deb +" > aptarchive/mirror.txt +rm -rf rootdir/var/lib/apt/lists +testsuccess apt update -o Acquire::By-Hash=force #-o Debug::pkgAcquire::Worker=1 +cp rootdir/tmp/testsuccess.output forcedbyhash.output +testfailure grep "localhost:${APTHTTPPORT}/failure" forcedbyhash.output +testrundownload 'foo=2' + msgmsg 'The prefix for the mirrorlist is' 'passed on' echo 'Dir::Bin::Methods::foo+mirror+file "mirror"; Dir::Bin::Methods::foo+mirror+http "mirror"; -- cgit v1.2.3-18-g5258