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') 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 From d642c9ea22f5705acfcba79493f48293626771c3 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 23 Jul 2010 16:37:13 +0200 Subject: * python/apt_pkgmodule.cc: - Bind pkgAcquire::Item::StatTransientNetworkError (Closes: #589010) --- debian/changelog | 2 ++ doc/source/library/apt_pkg.rst | 4 ++++ python/apt_pkgmodule.cc | 2 ++ 3 files changed, 8 insertions(+) (limited to 'python') diff --git a/debian/changelog b/debian/changelog index c76efa37..cb747f14 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ python-apt (0.7.97) UNRELEASED; urgency=low * doc/conf.py: - Correctly handle non-digit characters in version (ignore everything after them). + * python/apt_pkgmodule.cc: + - Bind pkgAcquire::Item::StatTransientNetworkError (Closes: #589010) -- Julian Andres Klode Fri, 23 Jul 2010 16:14:39 +0200 diff --git a/doc/source/library/apt_pkg.rst b/doc/source/library/apt_pkg.rst index dd958959..b91790db 100644 --- a/doc/source/library/apt_pkg.rst +++ b/doc/source/library/apt_pkg.rst @@ -1381,6 +1381,10 @@ installation. The item is yet to be fetched. + .. attribute:: STAT_TRANSIENT_NETWORK_ERROR + + There was a network error. + .. class:: AcquireFile(owner, uri[, md5, size, descr, short_descr, destdir, destfile]) diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc index a1e9ada0..cacbf77a 100644 --- a/python/apt_pkgmodule.cc +++ b/python/apt_pkgmodule.cc @@ -905,6 +905,8 @@ extern "C" void initapt_pkg() Py_BuildValue("i", pkgAcquire::Item::StatFetching)); PyDict_SetItemString(PyAcquireItem_Type.tp_dict, "STAT_DONE", Py_BuildValue("i", pkgAcquire::Item::StatDone)); + PyDict_SetItemString(PyAcquireItem_Type.tp_dict, "STAT_TRANSIENT_NETWORK_ERROR", + Py_BuildValue("i", pkgAcquire::Item::StatTransientNetworkError)); PyDict_SetItemString(PyAcquireItem_Type.tp_dict, "STAT_ERROR", Py_BuildValue("i", pkgAcquire::Item::StatError)); PyDict_SetItemString(PyAcquireItem_Type.tp_dict, "STAT_AUTH_ERROR", -- cgit v1.2.3