diff options
author | David Kalnischkies <david@kalnischkies.de> | 2015-08-28 19:26:44 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2015-08-28 19:26:44 +0200 |
commit | d7a51997c30b2098bb60b3397095ec58ec825303 (patch) | |
tree | f8dd90f51359b998983f7bb01afa20d1d9c22f0c /test/integration/test-pdiff-usage | |
parent | 79b60dcd78e6cb4c842c98ed5ba5be469a8181be (diff) |
implement PDiff patching for compressed files
Some additional files like 'Contents' are very big and should therefore
kept compressed on the disk, which apt-file did in the past. It also
implemented pdiff patching of these files by un- and recompressing these
files on-the-fly, with this commit we can do the same – but we can do
this in both pdiff patching styles (client and server merging) and
secured by hashes.
Hashes are in so far slightly complicated as we can't compare the hashes
of the compressed files as we might compress them differently than the
server would (different compressor versions, options, …), so we must
compare the hashes of the uncompressed content.
While this commit has changes in public headers, the classes it changes
are marked as hidden, so nobody can use them directly, which means the
ABI break is internal only.
Diffstat (limited to 'test/integration/test-pdiff-usage')
-rwxr-xr-x | test/integration/test-pdiff-usage | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage index e5fe21e0f..4dc94db76 100755 --- a/test/integration/test-pdiff-usage +++ b/test/integration/test-pdiff-usage @@ -254,23 +254,28 @@ echo 'Debug::pkgAcquire::Diffs "true"; Debug::Acquire::Transaction "true"; Debug::pkgAcquire::rred "true";' > rootdir/etc/apt/apt.conf.d/rreddebug.conf -testrun nohash -o Acquire::PDiffs::Merge=0 -o APT::Get::List-Cleanup=1 -testrun nohash -o Acquire::PDiffs::Merge=1 -o APT::Get::List-Cleanup=1 +testcase() { + testrun nohash -o Acquire::PDiffs::Merge=0 -o APT::Get::List-Cleanup=1 "$@" + testrun nohash -o Acquire::PDiffs::Merge=1 -o APT::Get::List-Cleanup=1 "$@" -testrun -o Acquire::PDiffs::Merge=0 -o APT::Get::List-Cleanup=1 -testrun -o Acquire::PDiffs::Merge=1 -o APT::Get::List-Cleanup=1 -testrun -o Acquire::PDiffs::Merge=0 -o APT::Get::List-Cleanup=0 -testrun -o Acquire::PDiffs::Merge=1 -o APT::Get::List-Cleanup=0 + testrun -o Acquire::PDiffs::Merge=0 -o APT::Get::List-Cleanup=1 "$@" + testrun -o Acquire::PDiffs::Merge=1 -o APT::Get::List-Cleanup=1 "$@" + testrun -o Acquire::PDiffs::Merge=0 -o APT::Get::List-Cleanup=0 "$@" + testrun -o Acquire::PDiffs::Merge=1 -o APT::Get::List-Cleanup=0 "$@" -sha256sum() { - echo '01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b -' -} -testrun -o Acquire::PDiffs::Merge=0 -o Acquire::ForceHash=SHA1 -testrun -o Acquire::PDiffs::Merge=1 -o Acquire::ForceHash=SHA1 + sha256sum() { + echo '01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b -' + } + testrun -o Acquire::PDiffs::Merge=0 -o Acquire::ForceHash=SHA1 "$@" + testrun -o Acquire::PDiffs::Merge=1 -o Acquire::ForceHash=SHA1 "$@" + unset -f sha256sum -unset -f sha256sum -sha1sum() { - echo 'adc83b19e793491b1c6ea0fd8b46cd9f32e592fc -' + sha1sum() { + echo 'adc83b19e793491b1c6ea0fd8b46cd9f32e592fc -' + } + testrun -o Acquire::PDiffs::Merge=0 -o Acquire::ForceHash=SHA256 "$@" + testrun -o Acquire::PDiffs::Merge=1 -o Acquire::ForceHash=SHA256 "$@" + unset -f sha1sum } -testrun -o Acquire::PDiffs::Merge=0 -o Acquire::ForceHash=SHA256 -testrun -o Acquire::PDiffs::Merge=1 -o Acquire::ForceHash=SHA256 +testcase -o Acquire::GzipIndexes=0 +testcase -o Acquire::GzipIndexes=1 |