3 # Ensure that we do not modify file:/// uris (regression test for 
   8 TESTDIR
=$(readlink -f $(dirname $0)) 
  12 configarchitecture 
"amd64" 
  13 configcompression 
'bz2' 'gz' 
  15 insertpackage 
'unstable' 'foo' 'all' '1' 
  16 insertsource 
'unstable' 'foo' 'all' '1' 
  18 setupaptarchive 
--no-update 
  20 # ensure the archive is not writable 
  21 addtrap 
'prefix' 'chmod 750 aptarchive/dists/unstable/main/binary-amd64;' 
  22 chmod 550 aptarchive
/dists
/unstable
/main
/binary
-amd64 
  24 testsuccess aptget update
 
  26 # the release files aren't an IMS-hit, but the indexes are 
  27 redatereleasefiles 
'+1 hour' 
  29 testsuccess aptget update 
-o Debug
::pkgAcquire
::Auth
=1 
  30 cp -a rootdir
/tmp
/testsuccess.output rootdir
/tmp
/update.output
 
  32 # ensure that the hash of the uncompressed file was verified even on a local ims hit 
  33 canary
="SHA512:$(bzcat aptarchive/dists/unstable/main/binary-amd64/Packages.bz2 | sha512sum |cut -f1 -d' ')" 
  34 testsuccess 
grep -- "$canary" rootdir
/tmp
/update.output
 
  36 # foo is still available 
  37 testsuccess aptget 
install -s foo
 
  38 testsuccess aptcache showsrc foo
 
  39 testsuccess aptget 
source foo 
--print-uris