4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
7 configarchitecture 'amd64'
9 insertpackage 'testing' 'foo' 'all' '1'
11 getcodenamefromsuite() { echo -n 'stretch'; }
12 setupaptarchive --no-update
13 APTARCHIVE="$(readlink -f './aptarchive')"
14 ln -s "${APTARCHIVE}/dists
/testing
" "${APTARCHIVE}/dists
/stretch
"
15 ln -s "${APTARCHIVE}/dists
/testing
" "${APTARCHIVE}/dists
/zurg
"
17 testfailure apt show foo
18 testsuccess apt update
19 testsuccess apt show foo
21 rm -rf rootdir/var/lib/apt/lists
22 sed -i -e 's#testing#stretch#g' rootdir/etc/apt/sources.list.d/*
23 testsuccess apt update
24 testsuccess apt show foo
26 rm -rf rootdir/var/lib/apt/lists
27 sed -i -e 's#stretch#zurg#g' rootdir/etc/apt/sources.list.d/*
28 testwarningmsg "W
: Conflicting distribution
: file:$APTARCHIVE zurg InRelease
(expected zurg but got stretch
)" apt update
29 testsuccess apt show foo
31 # check that 'foo/bar' is rewritten to 'foo' while we are at it
32 rm -rf rootdir/var/lib/apt/lists
33 sed -i -e 's#zurg#stretch/updates#g' rootdir/etc/apt/sources.list.d/*
34 testfailure apt update
35 testfailure apt show foo
36 ln -s "${APTARCHIVE}/dists
/testing
" "${APTARCHIVE}/dists
/stretch
/updates
"
37 testsuccess apt update
38 testsuccess apt show foo