summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2020-11-07 21:39:00 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2020-11-07 21:48:21 +0100
commit418f9272606857e312f485778a1ef1b263236463 (patch)
tree3c41a5c015ecdb3b5afe4f7e068682d2e4cec754
parent9e1398b164f55238990907f63dfdef60588d9b24 (diff)
Support reading compressed patches in rred direct call modes
The acquire system mode does this for a long time already and as it is easy to implement and handy for manual testing as well we can support it in the other modes, too.
-rw-r--r--methods/rred.cc2
-rwxr-xr-xtest/integration/test-method-rred3
2 files changed, 4 insertions, 1 deletions
diff --git a/methods/rred.cc b/methods/rred.cc
index b7825721c..0184456bf 100644
--- a/methods/rred.cc
+++ b/methods/rred.cc
@@ -806,7 +806,7 @@ int main(int argc, const char *argv[])
for (; argi < argmax; ++argi)
{
FileFd patch;
- if (not patch.Open(CmdL.FileList[argi], FileFd::ReadOnly))
+ if (not patch.Open(CmdL.FileList[argi], FileFd::ReadOnly, FileFd::Extension))
{
_error->DumpErrors(std::cerr);
return 1;
diff --git a/test/integration/test-method-rred b/test/integration/test-method-rred
index 00b4b7c0b..bef1a35e0 100755
--- a/test/integration/test-method-rred
+++ b/test/integration/test-method-rred
@@ -215,6 +215,9 @@ Description: fix later
.' > Packages.ed-0
createpatch 'Remove more stuff and fix later' '23d,
6d' > Packages.ed-1
+testsuccess apthelper cat-file --compress gzip Packages.ed-1
+mv rootdir/tmp/testsuccess.output Packages.ed-1.gz
+testsuccess rm Packages.ed-1
createpatch 'Remove (old) dog paragraph' '10,19d' > Packages.ed-2
mergepatches '11,19c
Package: extra-kittens