]> git.saurik.com Git - apt.git/blob - test/integration/test-releasefile-verification-noflat
save and restore selection states before/after calling dpkg
[apt.git] / test / integration / test-releasefile-verification-noflat
1 #!/bin/sh
2 set -e
3
4 TESTDIR="$(readlink -f "$(dirname "$0")")"
5 . "$TESTDIR/framework"
6
7 setupenvironment
8 configarchitecture "i386"
9
10 export APT_DONT_SIGN='Release.gpg'
11 insertpackage 'unstable' 'foo' 'i386' '1.0'
12 setupaptarchive "now" "now + 1 year"
13 changetowebserver
14
15 SIXPACK="$(aptkey --keyring keys/joesixpack.pub finger | grep 'Key fingerprint' | cut -d'=' -f 2 | tr -d ' ')"
16
17 testsuccess aptget update
18
19 msgmsg 'Warm archive with signed-by' 'Joe Sixpack'
20 sed -i "/^Valid-Until: / a\
21 Signed-By: ${SIXPACK}" rootdir/var/lib/apt/lists/*Release
22 touch -d 'now - 1 year' rootdir/var/lib/apt/lists/*Release
23 testsuccessequal "Get:1 http://localhost:${APTHTTPPORT} unstable InRelease [$(stat -c '%s' 'aptarchive/dists/unstable/InRelease') B]
24 Reading package lists..." aptget update
25 testsuccess aptcache show foo