summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2010-07-23 16:16:24 +0200
committerJulian Andres Klode <jak@debian.org>2010-07-23 16:16:24 +0200
commit7219ee607e72438bbbb755caebdc7f617ee440f4 (patch)
treeda53db9e194ff0d4c9cfa928fc434d7638cedc10
parentf85293fe8cdd2233ba7ce365711b6c0e275be19d (diff)
downloadpython-apt-7219ee607e72438bbbb755caebdc7f617ee440f4.tar.gz
* python/tag.cc:
- Support gzip compression for control files (Closes: #383617), requires APT (>> 0.7.26~exp10) to work.
-rw-r--r--debian/changelog8
-rw-r--r--python/tag.cc5
2 files changed, 13 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index b08a117c..cb2bcebb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+python-apt (0.7.97) UNRELEASED; urgency=low
+
+ * python/tag.cc:
+ - Support gzip compression for control files (Closes: #383617),
+ requires APT (>> 0.7.26~exp10) to work.
+
+ -- Julian Andres Klode <jak@debian.org> Fri, 23 Jul 2010 16:14:39 +0200
+
python-apt (0.7.96.1) unstable; urgency=low
* tests/test_debfile.py:
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);