summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-03-29 09:05:40 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2011-03-29 09:05:40 +0200
commitbb7a6b6a948ee5cd81e68558a8fdb2956bc1049b (patch)
tree10843eb09c1ed3179c7402cd0a5b8d1e37859aaf /python
parent22ab3421fbb8e936c3e6e32175a04ad801d7f511 (diff)
parent7df26fec497b8b1f191e49b99807c0570272f289 (diff)
downloadpython-apt-bb7a6b6a948ee5cd81e68558a8fdb2956bc1049b.tar.gz
merged from the debian branch
Diffstat (limited to 'python')
-rw-r--r--python/arfile.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/python/arfile.cc b/python/arfile.cc
index a279807d..5377ca8d 100644
--- a/python/arfile.cc
+++ b/python/arfile.cc
@@ -477,8 +477,8 @@ PyTypeObject PyArArchive_Type = {
* Representation of a Debian package.
*
* This does not resemble debDebFile in apt-inst, but instead is a subclass
- * of ArFile which adds properties for the control.tar.{lzma,bz2,gz} and
- * data.tar.{lzma,bz2,gz} members which return TarFile objects. It also adds
+ * of ArFile which adds properties for the control.tar.{xz,lzma,bz2,gz} and
+ * data.tar.{xz,lzma,bz2,gz} members which return TarFile objects. It also adds
* a descriptor 'version' which returns the content of 'debian-binary'.
*
* We are using it this way as it seems more natural to represent this special
@@ -541,8 +541,12 @@ static PyObject *debfile_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
self->data = _gettar(self, self->Object->FindMember("data.tar.lzma"),
"lzma");
if (!self->data)
+ self->data = _gettar(self, self->Object->FindMember("data.tar.xz"),
+ "xz");
+ if (!self->data)
return PyErr_Format(PyExc_SystemError, "No debian archive, missing %s",
- "data.tar.gz or data.tar.bz2 or data.tar.lzma");
+ "data.tar.gz or data.tar.bz2 or data.tar.lzma "
+ "or data.tar.xz");
const ARArchive::Member *member = self->Object->FindMember("debian-binary");
@@ -586,7 +590,7 @@ static PyGetSetDef debfile_getset[] = {
{"control",(getter)debfile_get_control,0,
"The TarFile object associated with the control.tar.gz member."},
{"data",(getter)debfile_get_data,0,
- "The TarFile object associated with the data.tar.{gz,bz2,lzma} member."},
+ "The TarFile object associated with the data.tar.{gz,bz2,lzma,xz}) member."},
{"debian_binary",(getter)debfile_get_debian_binary,0,
"The package version, as contained in debian-binary."},
{NULL}
@@ -600,7 +604,7 @@ static const char *debfile_doc =
"specifying a file descriptor (returned by e.g. os.open()).\n"
"The recommended way of using it is to pass in the path to the file.\n\n"
"It differs from ArArchive by providing the members 'control', 'data'\n"
- "and 'version' for accessing the control.tar.gz, data.tar.{gz,bz2,lzma},\n"
+ "and 'version' for accessing the control.tar.gz, data.tar.{gz,bz2,lzma,xz},\n"
"and debian-binary members in the archive.";
PyTypeObject PyDebFile_Type = {