]>
git.saurik.com Git - apt.git/blob - test/integration/test-handle-redirect-as-used-mirror-change
4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
7 configarchitecture 'amd64'
8 configcompression '.' 'gz'
10 buildsimplenativepackage 'unrelated' 'all' '0.5~squeeze1' 'unstable'
12 setupaptarchive --no-update
14 webserverconfig 'aptwebserver::redirect::replace::/redirectme/' "http
://0.0.0.0:${APTHTTPPORT}/"
15 rewritesourceslist "http
://localhost
:${APTHTTPPORT}/redirectme
"
17 testsuccessequal "Get
:1 http
://0.0.0.0:${APTHTTPPORT} unstable InRelease
[$(stat -c %s aptarchive/dists/unstable/InRelease) B
]
18 Get
:2 http
://0.0.0.0:${APTHTTPPORT} unstable
/main Sources
[$(stat -c %s aptarchive/dists/unstable/main/source/Sources.gz) B
]
19 Get
:3 http
://0.0.0.0:${APTHTTPPORT} unstable
/main all Packages
[$(stat -c %s aptarchive/dists/unstable/main/binary-all/Packages.gz) B
]
20 Get
:4 http
://0.0.0.0:${APTHTTPPORT} unstable
/main Translation
-en [$(stat -c %s aptarchive/dists/unstable/main/i18n/Translation-en.gz) B
]
21 Reading package lists...
" aptget update
23 # ensure we asked the redirector only once
24 testsuccessequal "Location
: http
://0.0.0.0:${APTHTTPPORT}/dists
/unstable
/InRelease
" grep '^Location:' aptarchive/webserver.log
26 testsuccessequal "Hit
:1 http
://0.0.0.0:${APTHTTPPORT} unstable InRelease
27 Reading package lists...
" aptget update
29 testsuccessequal "Location
: http
://0.0.0.0:${APTHTTPPORT}/dists
/unstable
/InRelease
30 Location
: http
://0.0.0.0:${APTHTTPPORT}/dists
/unstable
/InRelease
" grep '^Location:' aptarchive/webserver.log
32 rm -rf rootdir/var/lib/apt/lists
33 testsuccess apt update -o Debug::Acquire::http=1 -o Acquire::SameMirrorForAllIndexes=0
34 testsuccessequal "Location
: http
://0.0.0.0:${APTHTTPPORT}/dists
/unstable
/InRelease
35 Location
: http
://0.0.0.0:${APTHTTPPORT}/dists
/unstable
/InRelease
36 Location
: http
://0.0.0.0:${APTHTTPPORT}/dists
/unstable
/InRelease
37 Location
: http
://0.0.0.0:${APTHTTPPORT}/dists
/unstable
/main
/source
/Sources.gz
38 Location
: http
://0.0.0.0:${APTHTTPPORT}/dists
/unstable
/main
/binary
-all/Packages.gz
39 Location
: http
://0.0.0.0:${APTHTTPPORT}/dists
/unstable
/main
/i
18n
/Translation
-en.gz
" grep '^Location:' aptarchive/webserver.log