From 7219ee607e72438bbbb755caebdc7f617ee440f4 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 23 Jul 2010 16:16:24 +0200 Subject: * python/tag.cc: - Support gzip compression for control files (Closes: #383617), requires APT (>> 0.7.26~exp10) to work. --- python/tag.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'python/tag.cc') diff --git a/python/tag.cc b/python/tag.cc index 9fe12a1a..97039bc4 100644 --- a/python/tag.cc +++ b/python/tag.cc @@ -393,7 +393,12 @@ static PyObject *TagFileNew(PyTypeObject *type,PyObject *Args,PyObject *kwds) return 0; TagFileData *New = (TagFileData*)type->tp_alloc(type, 0); +#ifdef APT_HAS_GZIP + new (&New->Fd) FileFd(); + New->Fd.OpenDescriptor(fileno, FileFd::ReadOnlyGzip, false); +#else new (&New->Fd) FileFd(fileno,false); +#endif New->Owner = File; Py_INCREF(New->Owner); new (&New->Object) pkgTagFile(&New->Fd); -- cgit v1.2.3