From 418f9272606857e312f485778a1ef1b263236463 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 7 Nov 2020 21:39:00 +0100 Subject: 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. --- methods/rred.cc | 2 +- test/integration/test-method-rred | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3