]>
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 export APT_DONT_SIGN=''
13 setupaptarchive --no-update
15 webserverconfig 'aptwebserver::redirect::replace::/redirectme/' "http
://0.0.0.0:${APTHTTPPORT}/"
16 rewritesourceslist "http
://localhost
:${APTHTTPPORT}/redirectme
"
18 testsuccessequal "Get
:1 http
://0.0.0.0:${APTHTTPPORT} unstable InRelease
[$(stat -c %s aptarchive/dists/unstable/InRelease) B
]
19 Get
:2 http
://0.0.0.0:${APTHTTPPORT} unstable
/main Sources
[$(stat -c %s aptarchive/dists/unstable/main/source/Sources.gz) B
]
20 Get
:3 http
://0.0.0.0:${APTHTTPPORT} unstable
/main all Packages
[$(stat -c %s aptarchive/dists/unstable/main/binary-all/Packages.gz) B
]
21 Get
:4 http
://0.0.0.0:${APTHTTPPORT} unstable
/main Translation
-en [$(stat -c %s aptarchive/dists/unstable/main/i18n/Translation-en.gz) B
]
22 Reading package lists...
" aptget update
24 # ensure we asked the redirector only once
25 testsuccessequal "Location
: http
://0.0.0.0:${APTHTTPPORT}/dists
/unstable
/InRelease
" grep '^Location:' aptarchive/webserver.log
27 testsuccessequal "Hit
:1 http
://0.0.0.0:${APTHTTPPORT} unstable InRelease
28 Reading package lists...
" aptget update
30 testsuccessequal "Location
: http
://0.0.0.0:${APTHTTPPORT}/dists
/unstable
/InRelease
31 Location
: http
://0.0.0.0:${APTHTTPPORT}/dists
/unstable
/InRelease
" grep '^Location:' aptarchive/webserver.log
33 rm -rf rootdir/var/lib/apt/lists
34 testsuccess apt update -o Debug::Acquire::http=1 -o Acquire::SameMirrorForAllIndexes=0
35 testsuccessequal "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
/InRelease
38 Location
: http
://0.0.0.0:${APTHTTPPORT}/dists
/unstable
/main
/source
/Sources.gz
39 Location
: http
://0.0.0.0:${APTHTTPPORT}/dists
/unstable
/main
/binary
-all/Packages.gz
40 Location
: http
://0.0.0.0:${APTHTTPPORT}/dists
/unstable
/main
/i
18n
/Translation
-en.gz
" grep '^Location:' aptarchive/webserver.log
43 testsuccess apthelper download-file "http
://localhost
:${APTHTTPPORT}/redirectme
/dists
/unstable
/InRelease
" inrelease
44 testsuccess test -s inrelease
47 find aptarchive -name 'InRelease' -delete
48 rm -rf rootdir/var/lib/apt/lists
50 testsuccessequal "Ign
:1 http
://0.0.0.0:${APTHTTPPORT} unstable InRelease
52 Get
:2 http
://0.0.0.0:${APTHTTPPORT} unstable Release
[$(stat -c %s aptarchive/dists/unstable/Release) B
]
53 Get
:3 http
://0.0.0.0:${APTHTTPPORT} unstable Release.gpg
[$(stat -c %s aptarchive/dists/unstable/Release.gpg) B
]
54 Get
:4 http
://0.0.0.0:${APTHTTPPORT} unstable
/main Sources
[$(stat -c %s aptarchive/dists/unstable/main/source/Sources.gz) B
]
55 Get
:5 http
://0.0.0.0:${APTHTTPPORT} unstable
/main all Packages
[$(stat -c %s aptarchive/dists/unstable/main/binary-all/Packages.gz) B
]
56 Get
:6 http
://0.0.0.0:${APTHTTPPORT} unstable
/main Translation
-en [$(stat -c %s aptarchive/dists/unstable/main/i18n/Translation-en.gz) B
]
57 Reading package lists...
" aptget update
59 testsuccessequal "Ign
:1 http
://0.0.0.0:${APTHTTPPORT} unstable InRelease
61 Hit
:2 http
://0.0.0.0:${APTHTTPPORT} unstable Release
62 Reading package lists...
" aptget update