summaryrefslogtreecommitdiff
path: root/test/integration/test-pdiff-usage
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-08-24 21:44:11 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-08-24 21:44:11 +0200
commit17ea77d3332ce3abbbc96a9e110a37ae055ac422 (patch)
tree611708d199721f5bca0ea4826d03da0016f3780d /test/integration/test-pdiff-usage
parent7e32e3e58d5499056b17acd0a9992704e3f55951 (diff)
parent39ee79d5b84390ae79d8cce9389c1541bcd68a25 (diff)
* merged from debian/unstable
* merge of the debian-expermental-ma branch * refresh po/pot files in doc/ and po/ * Fix spelling error in cmdline/apt-get.cc. Thanks to Osamu Aoki Closes: #594211 * Swedish (Daniel Nylander). Closes: #592366 * French (Christian Perrier) * Thai (Theppitak Karoonboonyanan). Closes: #592695 * Russian (Yuri Kozlov). Closes: #594232 * French (Christian Perrier) * apt-pkg/contrib/strutl.cc: - fix error checking for vsnprintf in its safe variant * methods/bzip2.cc: - fix error checking for read in case of failing bzip2/lzma/whatever * debian/apt.cron.daily: - create backups for our extended_states file (Closes: #593430) * apt-pkg/init.cc: - set the default values for dir::etc::trusted options correctly * ftparchive/writer.cc: - init valid-until correctly to prevent garbage entering Release file * apt-pkg/deb/debsystem.cc: - set dir::state::status based at least on dir * apt-pkg/deb/dpkgpm.cc: - use the InstVer instead of the CurrentVer for the autobit transfer * methods/http.cc: - some http servers violate HTTP1.1 by not issuing a Reason-Phrase (or at least a space after the code) especially for 200, but lets be nice and ignore it as we don't need the reason in general * apt-pkg/acquire-item.cc: - don't use ReadOnlyGzip mode for PDiffs as this mode doesn't work in combination with the AddFd methods of our hashclasses
Diffstat (limited to 'test/integration/test-pdiff-usage')
-rwxr-xr-xtest/integration/test-pdiff-usage51
1 files changed, 51 insertions, 0 deletions
diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage
new file mode 100755
index 000000000..85cbe9082
--- /dev/null
+++ b/test/integration/test-pdiff-usage
@@ -0,0 +1,51 @@
+#!/bin/sh
+set -e
+
+local TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+
+setupenvironment
+configarchitecture "i386"
+
+buildaptarchive
+setupflataptarchive
+changetowebserver
+signreleasefiles
+aptget update -qq
+
+testnopackage newstuff
+PKGFILE="${TESTDIR}/$(echo "$(basename $0)" | sed 's#^test-#Packages-#')"
+testequal "$(cat ${PKGFILE})
+" aptcache show apt oldstuff
+
+cp ${PKGFILE}-new aptarchive/Packages
+cat aptarchive/Packages | gzip > aptarchive/Packages.gz
+cat aptarchive/Packages | bzip2 > aptarchive/Packages.bz2
+cat aptarchive/Packages | lzma > aptarchive/Packages.lzma
+rm -rf aptarchive/Packages.diff
+aptftparchive release aptarchive/ > aptarchive/Release
+mkdir -p aptarchive/Packages.diff
+PATCHFILE="aptarchive/Packages.diff/$(date +%Y-%m-%d-%H%M.%S)"
+diff -e ${PKGFILE} ${PKGFILE}-new > ${PATCHFILE} || true
+cat $PATCHFILE | gzip > ${PATCHFILE}.gz
+PATCHINDEX="aptarchive/Packages.diff/Index"
+echo "SHA1-Current: $(sha1sum ${PKGFILE}-new | cut -d' ' -f 1) $(stat -c%s ${PKGFILE}-new)
+SHA1-History:
+ 9f4148e06d7faa37062994ff10d0c842d7017513 33053002 2010-08-18-2013.28
+ $(sha1sum $PKGFILE | cut -d' ' -f 1) $(stat -c%s $PKGFILE) $(basename $PATCHFILE)
+SHA1-Patches:
+ 7651fc0ac57cd83d41c63195a9342e2db5650257 19722 2010-08-18-0814.28
+ $(sha1sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE) $(basename $PATCHFILE)" > $PATCHINDEX
+sed -i aptarchive/Release \
+ -e "/^MD5Sum:/ a\
+ \ $(md5sum $PATCHINDEX | cut -d' ' -f 1) $(stat -c%s $PATCHINDEX) Packages.diff/Index" \
+ -e "/^SHA1:/ a\
+ \ $(sha1sum $PATCHINDEX | cut -d' ' -f 1) $(stat -c%s $PATCHINDEX) Packages.diff/Index" \
+ -e "/^SHA256:/ a\
+ \ $(sha256sum $PATCHINDEX | cut -d' ' -f 1) $(stat -c%s $PATCHINDEX) Packages.diff/Index"
+signreleasefiles
+aptget update -qq
+
+testnopackage oldstuff
+testequal "$(cat ${PKGFILE}-new)
+" aptcache show apt newstuff