summaryrefslogtreecommitdiff
path: root/test/integration/test-pdiff-usage
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-03-13 01:02:30 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2016-03-14 11:47:19 +0100
commitb7a1076f18022cbeb7baf4d82ab8bae0f725a573 (patch)
tree38e0cdc76ec0ed77723323f3f5eee63509c1aad0 /test/integration/test-pdiff-usage
parent6a1de8b79299ca1152106361aa6b41730635c5cc (diff)
don't use Desc.URI to calculate .diff/Index filenames
The URI descibing an item can change via mirrors/redirectors which causes the .diff/Index files to get the wrong names in storage. Git-Dch: Ignore
Diffstat (limited to 'test/integration/test-pdiff-usage')
-rwxr-xr-xtest/integration/test-pdiff-usage15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage
index 2318448f5..11c8c4cc1 100755
--- a/test/integration/test-pdiff-usage
+++ b/test/integration/test-pdiff-usage
@@ -65,7 +65,7 @@ testrun() {
configcompression '.' 'gz'
# see if the code deals properly with leftover partial files
- touch rootdir/var/lib/apt/lists-bak/partial/localhost:${APTHTTPPORT}_Packages
+ partialleftovers
msgmsg "Testcase: apply with one patch: $*"
find aptarchive -name 'Packages*' -type f -delete
@@ -279,7 +279,20 @@ testcase() {
testrun -o Acquire::PDiffs::Merge=0 -o APT::Get::List-Cleanup=0 "$@"
testrun -o Acquire::PDiffs::Merge=1 -o APT::Get::List-Cleanup=0 "$@"
}
+partialleftovers() { touch "rootdir/var/lib/apt/lists-bak/partial/localhost:${APTHTTPPORT}_Packages"; }
aptautotest_apt_update() { aptautotest_aptget_update "$@"; testsuccess test -e "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_Packages"; }
testcase -o Acquire::IndexTargets::deb::Packages::KeepCompressed=false
+partialleftovers() { touch "rootdir/var/lib/apt/lists-bak/partial/localhost:${APTHTTPPORT}_Packages.$LOWCOSTEXT"; }
aptautotest_apt_update() { aptautotest_aptget_update "$@"; testsuccess test -e "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_Packages.$LOWCOSTEXT"; }
testcase -o Acquire::IndexTargets::deb::Packages::KeepCompressed=true
+
+
+partialleftovers() { touch "rootdir/var/lib/apt/lists-bak/partial/localhost:${APTHTTPPORT}_redirectme_Packages.$LOWCOSTEXT"; }
+webserverconfig 'aptwebserver::redirect::replace::/redirectme/' "http://0.0.0.0:${APTHTTPPORT}/"
+rewritesourceslist "http://localhost:${APTHTTPPORT}/redirectme"
+aptautotest_apt_update() {
+ aptautotest_aptget_update "$@"
+ testsuccess test -e "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_redirectme_Packages.$LOWCOSTEXT"
+ testempty find rootdir/var/lib/apt/lists -type f \! \( -name lock -o -name '*_redirectme_*' \)
+}
+testcase -o Acquire::IndexTargets::deb::Packages::KeepCompressed=true