4 TESTDIR
=$(readlink -f $(dirname $0))
7 configarchitecture
"i386"
9 msgtest
'Test apt-ftparchive source with missing hashes in .dsc'
11 touch aptarchive
/foo_1.0.
tar.gz
12 cat > aptarchive
/foo_1.0.dsc
<< EOF
21 d41d8cd98f00b204e9800998ecf8427e 0 foo_1.0.tar.gz
24 # check for the SHA hashes
25 aptftparchive sources aptarchive
/ > aptarchive
/Sources
2>/dev
/null
|| msgfail
26 test -n "$(grep Checksums-Sha512 aptarchive/Sources)" && msgpass
|| msgfail
28 for hash in sha512sum sha256sum
sha1sum; do
29 for f
in foo_1.0.
tar.gz foo_1.0.dsc
; do
30 SUM
=$($hash aptarchive/$f | cut -d' ' -f1)
31 msgtest
"Test $hash hash matches for $f"
32 NEEDLE
="$SUM $(stat -c%s aptarchive/$f) $f"
33 test -n "$SUM" && test -n "$(grep "$NEEDLE" aptarchive/Sources)" && msgpass
|| msgfail