From e3ebbfe848d3d03baaf969374ac55641873bb798 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 21 Mar 2011 15:13:08 +0100 Subject: releasing version 0.7.100.2 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 0641983d..0ffd5145 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -python-apt (0.7.100.2) UNRELEASED; urgency=low +python-apt (0.7.100.2) unstable; urgency=low * apt/progress/text.py: - only run ioctl for termios.TIOCGWINSZ if the fd is a tty @@ -26,7 +26,7 @@ python-apt (0.7.100.2) UNRELEASED; urgency=low * tests/test_deps.py: - add test forapt_pkg.parse_depends(strip_multiarch=True) - -- Michael Vogt Mon, 21 Mar 2011 14:48:35 +0100 + -- Michael Vogt Mon, 21 Mar 2011 14:56:01 +0100 python-apt (0.7.100.1) unstable; urgency=low -- cgit v1.2.3 From d902f6e33493be74d7908b859d6272a7892f635c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 21 Mar 2011 16:30:25 +0100 Subject: * python/arfile.cc, apt/debfile.py: - add support for .xz archives * tests/test_debfile.py: - add test for xz compression --- apt/debfile.py | 3 ++- debian/changelog | 9 +++++++++ python/arfile.cc | 14 +++++++++----- tests/data/test_debs/data-tar-xz.deb | Bin 0 -> 626 bytes tests/test_debfile.py | 5 +++++ 5 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 tests/data/test_debs/data-tar-xz.deb (limited to 'debian') diff --git a/apt/debfile.py b/apt/debfile.py index 86fd221b..fb4312a1 100644 --- a/apt/debfile.py +++ b/apt/debfile.py @@ -40,7 +40,8 @@ class DebPackage(object): VERSION_SAME, VERSION_NEWER) = range(4) - _supported_data_members = ("data.tar.gz", "data.tar.bz2", "data.tar.lzma") + _supported_data_members = ("data.tar.gz", "data.tar.bz2", "data.tar.lzma", + "data.tar.xz") debug = 0 diff --git a/debian/changelog b/debian/changelog index 0ffd5145..845b4cd3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +python-apt (0.7.100.3) UNRELEASED; urgency=low + + * python/arfile.cc, apt/debfile.py: + - add support for .xz archives + * tests/test_debfile.py: + - add test for xz compression + + -- Michael Vogt Mon, 21 Mar 2011 15:46:50 +0100 + python-apt (0.7.100.2) unstable; urgency=low * apt/progress/text.py: 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 @@ -540,9 +540,13 @@ static PyObject *debfile_new(PyTypeObject *type, PyObject *args, PyObject *kwds) if (!self->data) 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 = { diff --git a/tests/data/test_debs/data-tar-xz.deb b/tests/data/test_debs/data-tar-xz.deb new file mode 100644 index 00000000..fc15f597 Binary files /dev/null and b/tests/data/test_debs/data-tar-xz.deb differ diff --git a/tests/test_debfile.py b/tests/test_debfile.py index 712c4958..32e52ddb 100644 --- a/tests/test_debfile.py +++ b/tests/test_debfile.py @@ -112,6 +112,11 @@ Description: testpackage for gdebi - contains usr/bin/binary for file reading content = deb.control_content("control") self.assertEqual(content, needle) + def test_xz_data(self): + deb = apt.debfile.DebPackage("./data/test_debs/data-tar-xz.deb") + self.assertEqual(deb.filelist, ["./", "usr/", "usr/bin/"]) + + if __name__ == "__main__": #logging.basicConfig(level=logging.DEBUG) unittest.main() -- cgit v1.2.3 From 7df26fec497b8b1f191e49b99807c0570272f289 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 22 Mar 2011 09:57:25 +0100 Subject: update priority of python3-apt to match the archive --- debian/changelog | 1 + debian/control | 1 + 2 files changed, 2 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 845b4cd3..0be3ab65 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ python-apt (0.7.100.3) UNRELEASED; urgency=low - add support for .xz archives * tests/test_debfile.py: - add test for xz compression + * update priority of python3-apt to match the archive -- Michael Vogt Mon, 21 Mar 2011 15:46:50 +0100 diff --git a/debian/control b/debian/control index a84733d1..c434e35b 100644 --- a/debian/control +++ b/debian/control @@ -97,6 +97,7 @@ Description: Python interface to libapt-pkg (locales) This package contains locales. Package: python3-apt +Priority: optional Architecture: any Depends: ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends}, python-apt-common Recommends: lsb-release, iso-codes -- cgit v1.2.3