3 # Ensure that when going from unauthenticated to authenticated all 
   4 # files are checked again 
   8 TESTDIR
=$(readlink -f $(dirname $0)) 
  14 configarchitecture 
"i386" 
  16 insertpackage 
'unstable' 'foo' 'i386' '1.0' 
  17 insertsource 
'unstable' 'foo' 'any' '1.0' 
  19 setupaptarchive 
--no-update 
  23 #  - also check the unauth -> auth success case, i.e. that all files are 
  26     # start unauthenticated 
  27     rm -rf rootdir
/var
/lib
/apt
/lists
/ 
  28     find aptarchive
/ -name '*Release*' -delete 
  30     testwarning aptget update 
--allow-insecure-repositories 
  32     # become authenticated 
  36     # move uncompressed away 
  37     mv aptarchive
/dists
/unstable
/main
/binary
-i386/Packages \
 
  38         aptarchive
/dists
/unstable
/main
/binary
-i386/Packages.uncompressed
 
  40     # and ensure we re-check the downloaded data 
  42     # change the local packages file 
  43     PKGS
=$(ls rootdir/var/lib/apt/lists/*Packages*) 
  45     listcurrentlistsdirectory 
> lists.before
 
  47     # update and ensure all is reverted on the hashsum failure 
  48     testfailure aptget update 
-o Debug
::Acquire
::Transaction
=0 -o Debug
::pkgAcquire
::Auth
=1 -o Debug
::pkgAcquire
::worker
=0 -o Debug
::acquire
::http
=0 
  50     # ensure we have before what we have after 
  51     msgtest 
'Check rollback on going from' 'unauth -> auth' 
  52     listcurrentlistsdirectory 
> lists.after
 
  53     if cmp lists.before lists.after
; then 
  56         echo >&2 '### Output of previous apt-get update ###' 
  57         cat >&2 rootdir
/tmp
/testfailure.output
 
  58         echo >&2 '### Changes in the lists-directory: ###' 
  59         diff -u >&2 lists.before lists.after
 
  63     # move uncompressed back for release file 
  64     mv aptarchive
/dists
/unstable
/main
/binary
-i386/Packages.uncompressed \
 
  65         aptarchive
/dists
/unstable
/main
/binary
-i386/Packages
 
  68 for COMPRESSEDINDEXES 
in 'false' 'true'; do 
  69         echo "Acquire::GzipIndexes \"$COMPRESSEDINDEXES\";" > rootdir
/etc
/apt
/apt.conf.d
/compressindexes
 
  70         if $COMPRESSEDINDEXES; then 
  71                 msgmsg 
'Run tests with GzipIndexes enabled' 
  73                 msgmsg 
'Run tests with GzipIndexes disabled'