]>
git.saurik.com Git - apt.git/blob - test/integration/skip-bug-602412-dequote-redirect
4 TESTDIR
=$(readlink -f $(dirname $0))
7 configarchitecture
'i386'
9 if ! which lighttpd
> /dev
/null
; then
10 msgdie
'You need lighttpd for this testcase, sorry…'
14 buildsimplenativepackage
'unrelated' 'all' '0.5~squeeze1' 'unstable'
18 echo "server.modules = ( \"mod_redirect\" )
19 server.document-root = \"$(readlink -f ./aptarchive)\"
21 server.stat-cache-engine = \"disable\"
22 url.redirect = ( \"^/pool/(.*)$\" => \"/newpool/\$1\",
23 \"^/dists/(.*)$\" => \"/newdists/\$1\" )" > lighttpd.conf
25 mv aptarchive
/pool aptarchive
/newpool
26 mv aptarchive
/dists aptarchive
/newdists
28 lighttpd
-t -f lighttpd.conf
>/dev
/null
|| msgdie
'Can not change to webserver: our lighttpd config is invalid'
29 lighttpd
-D -f lighttpd.conf
2>/dev
/null
>/dev
/null
&
32 APTARCHIVE
="file://$(readlink -f ./aptarchive)"
33 for LIST
in $(find rootdir/etc/apt/sources.list.d/ -name 'apt-test-*.list'); do
34 sed -i $LIST -e "s#$APTARCHIVE#http://localhost:8080/#"
37 aptget update
|| msgdie
'apt-get update failed'
38 aptget
install unrelated
--download-only || msgdie
'downloading package failed'