]> git.saurik.com Git - apt.git/blame - test/integration/skip-bug-602412-dequote-redirect
fix the hold-testcase as it has problems with 'foreign' operations
[apt.git] / test / integration / skip-bug-602412-dequote-redirect
CommitLineData
c34ea12a
DK
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6setupenvironment
7configarchitecture 'i386'
8
9if ! which lighttpd > /dev/null; then
10 msgdie 'You need lighttpd for this testcase, sorry…'
11 exit 1
12fi
13
14buildsimplenativepackage 'unrelated' 'all' '0.5~squeeze1' 'unstable'
15
16setupaptarchive
17
18echo "server.modules = ( \"mod_redirect\" )
19server.document-root = \"$(readlink -f ./aptarchive)\"
20server.port = 8080
21server.stat-cache-engine = \"disable\"
22url.redirect = ( \"^/pool/(.*)$\" => \"/newpool/\$1\" )" > lighttpd.conf
23
24mv aptarchive/pool aptarchive/newpool
25lighttpd -t -f lighttpd.conf >/dev/null || msgdie 'Can not change to webserver: our lighttpd config is invalid'
26lighttpd -D -f lighttpd.conf 2>/dev/null >/dev/null &
27addtrap "kill $!;"
28
29local APTARCHIVE="file://$(readlink -f ./aptarchive)"
30for LIST in $(find rootdir/etc/apt/sources.list.d/ -name 'apt-test-*.list'); do
31 sed -i $LIST -e "s#$APTARCHIVE#http://localhost:8080/#"
32done
33
34aptget update -qq || msgdie 'apt-get update failed'
35aptget install unrelated --download-only -qq || msgdie 'downloading package failed'
36