]>
git.saurik.com Git - apt.git/blob - test/integration/test-apt-update-unauth
3 # Ensure that when going from unauthenticated to authenticated all
4 # files are checked again
8 TESTDIR
=$(readlink -f $(dirname $0))
12 configarchitecture
"i386"
14 insertpackage
'unstable' 'foo' 'all' '1.0'
15 insertsource
'unstable' 'foo' 'all' '1.0'
21 # - also check the unauth -> auth success case, i.e. that all files are
24 # start unauthenticated
25 find rootdir
/var
/lib
/apt
/lists
/ -type f
| xargs rm -f
26 rm -f aptarchive
/dists
/unstable
/*Release
*
27 # remove uncompressed version
28 find aptarchive
/ -name Packages
| xargs rm -f
29 aptget update
-qq --allow-unauthenticated
31 # become authenticated
35 # and ensure we re-check the downloaded data
36 msgtest
"Check rollback on going from unauth -> auth"
38 # change the local packages file
39 PKGS
=$(ls rootdir/var/lib/apt/lists/*Packages*)
41 ls -l rootdir
/var
/lib
/apt
/lists
> lists.before
43 # update and ensure all is reverted on the hashsum failure
44 aptget update
-o Debug
::Acquire
::Transaction
=1 -o Debug
::pkgAcquire
::Auth
=1 -o Debug
::pkgAcquire
::worker
=0 > output.log
2>&1 || true
46 # ensure we have before what we have after
47 ls -l rootdir
/var
/lib
/apt
/lists
> lists.after
48 if diff -u lists.before lists.after
; then
57 for COMPRESSEDINDEXES
in 'false' 'true'; do
58 echo "Acquire::GzipIndexes \"$COMPRESSEDINDEXES\";" > rootdir
/etc
/apt
/apt.conf.d
/compressindexes
59 if $COMPRESSEDINDEXES; then
60 msgmsg
'Run tests with GzipIndexes enabled'
62 msgmsg
'Run tests with GzipIndexes disabled'