]> git.saurik.com Git - apt.git/blame - test/integration/test-pdiff-usage
cherry pick test/integration/Packages-hashsum-verification addition from lp:~mvo...
[apt.git] / test / integration / test-pdiff-usage
CommitLineData
f213b6ea
DK
1#!/bin/sh
2set -e
3
9962ae93 4TESTDIR=$(readlink -f $(dirname $0))
f213b6ea
DK
5. $TESTDIR/framework
6
7setupenvironment
8configarchitecture "i386"
9
10buildaptarchive
11setupflataptarchive
12changetowebserver
13signreleasefiles
14aptget update -qq
15
16testnopackage newstuff
17PKGFILE="${TESTDIR}/$(echo "$(basename $0)" | sed 's#^test-#Packages-#')"
18testequal "$(cat ${PKGFILE})
19" aptcache show apt oldstuff
20
21cp ${PKGFILE}-new aptarchive/Packages
22cat aptarchive/Packages | gzip > aptarchive/Packages.gz
23cat aptarchive/Packages | bzip2 > aptarchive/Packages.bz2
24cat aptarchive/Packages | lzma > aptarchive/Packages.lzma
25rm -rf aptarchive/Packages.diff
f213b6ea
DK
26mkdir -p aptarchive/Packages.diff
27PATCHFILE="aptarchive/Packages.diff/$(date +%Y-%m-%d-%H%M.%S)"
28diff -e ${PKGFILE} ${PKGFILE}-new > ${PATCHFILE} || true
29cat $PATCHFILE | gzip > ${PATCHFILE}.gz
30PATCHINDEX="aptarchive/Packages.diff/Index"
31echo "SHA1-Current: $(sha1sum ${PKGFILE}-new | cut -d' ' -f 1) $(stat -c%s ${PKGFILE}-new)
32SHA1-History:
33 9f4148e06d7faa37062994ff10d0c842d7017513 33053002 2010-08-18-2013.28
34 $(sha1sum $PKGFILE | cut -d' ' -f 1) $(stat -c%s $PKGFILE) $(basename $PATCHFILE)
35SHA1-Patches:
36 7651fc0ac57cd83d41c63195a9342e2db5650257 19722 2010-08-18-0814.28
37 $(sha1sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE) $(basename $PATCHFILE)" > $PATCHINDEX
321dfa5e 38generatereleasefiles
f213b6ea 39signreleasefiles
321dfa5e 40find aptarchive -name 'Packages*' -type f -delete
f213b6ea
DK
41aptget update -qq
42
43testnopackage oldstuff
44testequal "$(cat ${PKGFILE}-new)
45" aptcache show apt newstuff