summaryrefslogtreecommitdiff
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
parent22ab3421fbb8e936c3e6e32175a04ad801d7f511 (diff)
parent7df26fec497b8b1f191e49b99807c0570272f289 (diff)
downloadpython-apt-bb7a6b6a948ee5cd81e68558a8fdb2956bc1049b.tar.gz
merged from the debian branch
-rw-r--r--apt/debfile.py3
-rw-r--r--debian/changelog17
-rw-r--r--debian/control1
-rw-r--r--po/python-apt.pot188
-rw-r--r--python/arfile.cc14
-rw-r--r--tests/data/test_debs/data-tar-xz.debbin0 -> 626 bytes
-rw-r--r--tests/test_debfile.py5
7 files changed, 141 insertions, 87 deletions
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 97bdd506..0be3ab65 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,14 @@
-python-apt (0.7.100.2) UNRELEASED; urgency=low
+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
+ * update priority of python3-apt to match the archive
+
+ -- Michael Vogt <mvo@debian.org> Mon, 21 Mar 2011 15:46:50 +0100
+
+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
@@ -16,6 +26,9 @@ python-apt (0.7.100.2) UNRELEASED; urgency=low
- provide bindings for new libapt SetCandidateRelease()
* debian/control:
- require new libapt-pkg-dev SetCandidateRelease()
+ * py3 compatible exception handline
+ * debian/control:
+ - bump minimal python version to >= 2.6
* python/apt_pkgmodule.cc:
- strip multiarch by default in RealParseDepends
- add optional parameter to allow parse_depends() to keep the
@@ -23,7 +36,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 <mvo@debian.org> Tue, 07 Dec 2010 13:41:07 +0100
+ -- Michael Vogt <mvo@debian.org> Mon, 21 Mar 2011 14:56:01 +0100
python-apt (0.7.100.1) unstable; urgency=low
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
diff --git a/po/python-apt.pot b/po/python-apt.pot
index 3d9c40c9..682c133a 100644
--- a/po/python-apt.pot
+++ b/po/python-apt.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-08-05 23:14+0200\n"
+"POT-Creation-Date: 2011-03-21 15:01+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -34,257 +34,287 @@ msgid "Cdrom with Ubuntu 10.10 'Maverick Meerkat'"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:74
+#: ../data/templates/Ubuntu.info.in:43
+msgid "Canonical Partners"
+msgstr ""
+
+#. CompDescription
+#: ../data/templates/Ubuntu.info.in:45
+msgid "Software packaged by Canonical for their partners"
+msgstr ""
+
+#. CompDescriptionLong
+#: ../data/templates/Ubuntu.info.in:46
+msgid "This software is not part of Ubuntu."
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:53
+msgid "Independent"
+msgstr ""
+
+#. CompDescription
+#: ../data/templates/Ubuntu.info.in:55
+msgid "Provided by third-party software developers"
+msgstr ""
+
+#. CompDescriptionLong
+#: ../data/templates/Ubuntu.info.in:56
+msgid "Software offered by third party developers."
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:94
msgid "Ubuntu 10.04 'Lucid Lynx'"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:92
+#: ../data/templates/Ubuntu.info.in:112
msgid "Cdrom with Ubuntu 10.04 'Lucid Lynx'"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:135
+#: ../data/templates/Ubuntu.info.in:155
msgid "Ubuntu 9.10 'Karmic Koala'"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:153
+#: ../data/templates/Ubuntu.info.in:173
msgid "Cdrom with Ubuntu 9.10 'Karmic Koala'"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:196
+#: ../data/templates/Ubuntu.info.in:216
msgid "Ubuntu 9.04 'Jaunty Jackalope'"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:214
+#: ../data/templates/Ubuntu.info.in:234
msgid "Cdrom with Ubuntu 9.04 'Jaunty Jackalope'"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:257
+#: ../data/templates/Ubuntu.info.in:277
msgid "Ubuntu 8.10 'Intrepid Ibex'"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:275
+#: ../data/templates/Ubuntu.info.in:295
msgid "Cdrom with Ubuntu 8.10 'Intrepid Ibex'"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:319
+#: ../data/templates/Ubuntu.info.in:339
msgid "Ubuntu 8.04 'Hardy Heron'"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:337
+#: ../data/templates/Ubuntu.info.in:357
msgid "Cdrom with Ubuntu 8.04 'Hardy Heron'"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:382
+#: ../data/templates/Ubuntu.info.in:402
msgid "Ubuntu 7.10 'Gutsy Gibbon'"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:400
+#: ../data/templates/Ubuntu.info.in:420
msgid "Cdrom with Ubuntu 7.10 'Gutsy Gibbon'"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:445
+#: ../data/templates/Ubuntu.info.in:465
msgid "Ubuntu 7.04 'Feisty Fawn'"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:463
+#: ../data/templates/Ubuntu.info.in:483
msgid "Cdrom with Ubuntu 7.04 'Feisty Fawn'"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:505
+#: ../data/templates/Ubuntu.info.in:525
msgid "Ubuntu 6.10 'Edgy Eft'"
msgstr ""
#. CompDescription
-#: ../data/templates/Ubuntu.info.in:510
+#: ../data/templates/Ubuntu.info.in:530
msgid "Community-maintained"
msgstr ""
#. CompDescription
-#: ../data/templates/Ubuntu.info.in:516
+#: ../data/templates/Ubuntu.info.in:536
msgid "Restricted software"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:523
+#: ../data/templates/Ubuntu.info.in:543
msgid "Cdrom with Ubuntu 6.10 'Edgy Eft'"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:565
+#: ../data/templates/Ubuntu.info.in:585
msgid "Ubuntu 6.06 LTS 'Dapper Drake'"
msgstr ""
#. CompDescriptionLong
-#: ../data/templates/Ubuntu.info.in:568
+#: ../data/templates/Ubuntu.info.in:588
msgid "Canonical-supported Open Source software"
msgstr ""
#. CompDescription
-#: ../data/templates/Ubuntu.info.in:570
+#: ../data/templates/Ubuntu.info.in:590
msgid "Community-maintained (universe)"
msgstr ""
#. CompDescriptionLong
-#: ../data/templates/Ubuntu.info.in:571
+#: ../data/templates/Ubuntu.info.in:591
msgid "Community-maintained Open Source software"
msgstr ""
#. CompDescription
-#: ../data/templates/Ubuntu.info.in:573
+#: ../data/templates/Ubuntu.info.in:593
msgid "Non-free drivers"
msgstr ""
#. CompDescriptionLong
-#: ../data/templates/Ubuntu.info.in:574
+#: ../data/templates/Ubuntu.info.in:594
msgid "Proprietary drivers for devices"
msgstr ""
#. CompDescription
-#: ../data/templates/Ubuntu.info.in:576
+#: ../data/templates/Ubuntu.info.in:596
msgid "Restricted software (Multiverse)"
msgstr ""
#. CompDescriptionLong
-#: ../data/templates/Ubuntu.info.in:577
+#: ../data/templates/Ubuntu.info.in:597
msgid "Software restricted by copyright or legal issues"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:583
+#: ../data/templates/Ubuntu.info.in:603
msgid "Cdrom with Ubuntu 6.06 LTS 'Dapper Drake'"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:599
+#: ../data/templates/Ubuntu.info.in:619
msgid "Important security updates"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:604
+#: ../data/templates/Ubuntu.info.in:624
msgid "Recommended updates"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:609
+#: ../data/templates/Ubuntu.info.in:629
msgid "Pre-released updates"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:614
+#: ../data/templates/Ubuntu.info.in:634
msgid "Unsupported updates"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:625
+#: ../data/templates/Ubuntu.info.in:645
msgid "Ubuntu 5.10 'Breezy Badger'"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:639
+#: ../data/templates/Ubuntu.info.in:659
msgid "Cdrom with Ubuntu 5.10 'Breezy Badger'"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:655
+#: ../data/templates/Ubuntu.info.in:675
msgid "Ubuntu 5.10 Security Updates"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:660
+#: ../data/templates/Ubuntu.info.in:680
msgid "Ubuntu 5.10 Updates"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:665
+#: ../data/templates/Ubuntu.info.in:685
msgid "Ubuntu 5.10 Backports"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:676
+#: ../data/templates/Ubuntu.info.in:696
msgid "Ubuntu 5.04 'Hoary Hedgehog'"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:690
+#: ../data/templates/Ubuntu.info.in:710
msgid "Cdrom with Ubuntu 5.04 'Hoary Hedgehog'"
msgstr ""
#. CompDescription
-#: ../data/templates/Ubuntu.info.in:693 ../data/templates/Debian.info.in:149
+#: ../data/templates/Ubuntu.info.in:713 ../data/templates/Debian.info.in:149
msgid "Officially supported"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:706
+#: ../data/templates/Ubuntu.info.in:726
msgid "Ubuntu 5.04 Security Updates"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:711
+#: ../data/templates/Ubuntu.info.in:731
msgid "Ubuntu 5.04 Updates"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:716
+#: ../data/templates/Ubuntu.info.in:736
msgid "Ubuntu 5.04 Backports"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:722
+#: ../data/templates/Ubuntu.info.in:742
msgid "Ubuntu 4.10 'Warty Warthog'"
msgstr ""
#. CompDescription
-#: ../data/templates/Ubuntu.info.in:728
+#: ../data/templates/Ubuntu.info.in:748
msgid "Community-maintained (Universe)"
msgstr ""
#. CompDescription
-#: ../data/templates/Ubuntu.info.in:730
+#: ../data/templates/Ubuntu.info.in:750
msgid "Non-free (Multiverse)"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:736
+#: ../data/templates/Ubuntu.info.in:756
msgid "Cdrom with Ubuntu 4.10 'Warty Warthog'"
msgstr ""
#. CompDescription
-#: ../data/templates/Ubuntu.info.in:739
+#: ../data/templates/Ubuntu.info.in:759
msgid "No longer officially supported"
msgstr ""
#. CompDescription
-#: ../data/templates/Ubuntu.info.in:741
+#: ../data/templates/Ubuntu.info.in:761
msgid "Restricted copyright"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:748
+#: ../data/templates/Ubuntu.info.in:768
msgid "Ubuntu 4.10 Security Updates"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:753
+#: ../data/templates/Ubuntu.info.in:773
msgid "Ubuntu 4.10 Updates"
msgstr ""
#. Description
-#: ../data/templates/Ubuntu.info.in:758
+#: ../data/templates/Ubuntu.info.in:778
msgid "Ubuntu 4.10 Backports"
msgstr ""
@@ -350,7 +380,7 @@ msgid "Non-DFSG-compatible Software"
msgstr ""
#. TRANSLATORS: %s is a country
-#: ../aptsources/distro.py:208 ../aptsources/distro.py:423
+#: ../aptsources/distro.py:209 ../aptsources/distro.py:424
#, python-format
msgid "Server for %s"
msgstr ""
@@ -358,12 +388,12 @@ msgstr ""
#. More than one server is used. Since we don't handle this case
#. in the user interface we set "custom servers" to true and
#. append a list of all used servers
-#: ../aptsources/distro.py:226 ../aptsources/distro.py:232
-#: ../aptsources/distro.py:248
+#: ../aptsources/distro.py:227 ../aptsources/distro.py:233
+#: ../aptsources/distro.py:249
msgid "Main server"
msgstr ""
-#: ../aptsources/distro.py:252
+#: ../aptsources/distro.py:253
msgid "Custom servers"
msgstr ""
@@ -395,11 +425,11 @@ msgstr ""
msgid "Invalid unicode in description for '%s' (%s). Please report."
msgstr ""
-#: ../apt/package.py:1007 ../apt/package.py:1112
+#: ../apt/package.py:1012 ../apt/package.py:1117
msgid "The list of changes is not available"
msgstr ""
-#: ../apt/package.py:1118
+#: ../apt/package.py:1123
#, python-format
msgid ""
"The list of changes is not available yet.\n"
@@ -408,29 +438,29 @@ msgid ""
"until the changes become available or try again later."
msgstr ""
-#: ../apt/package.py:1125
+#: ../apt/package.py:1130
msgid ""
"Failed to download the list of changes. \n"
"Please check your Internet connection."
msgstr ""
-#: ../apt/debfile.py:82
+#: ../apt/debfile.py:81
#, python-format
msgid "List of files for '%s' could not be read"
msgstr ""
-#: ../apt/debfile.py:167
+#: ../apt/debfile.py:166
#, python-format
msgid "Dependency is not satisfiable: %s\n"
msgstr ""
-#: ../apt/debfile.py:188
+#: ../apt/debfile.py:187
#, python-format
msgid "Conflicts with the installed package '%s'"
msgstr ""
#. TRANSLATORS: the first '%s' is the package that breaks, the second the dependency that makes it break, the third the relation (e.g. >=) and the latest the version for the releation
-#: ../apt/debfile.py:327
+#: ../apt/debfile.py:326
#, python-format
msgid ""
"Breaks existing package '%(pkgname)s' dependency %(depname)s "
@@ -438,7 +468,7 @@ msgid ""
msgstr ""
#. TRANSLATORS: the first '%s' is the package that conflicts, the second the packagename that it conflicts with (so the name of the deb the user tries to install), the third is the relation (e.g. >=) and the last is the version for the relation
-#: ../apt/debfile.py:343
+#: ../apt/debfile.py:342
#, python-format
msgid ""
"Breaks existing package '%(pkgname)s' conflict: %(targetpkg)s (%(comptype)s "
@@ -475,55 +505,55 @@ msgstr ""
msgid "Cannot install '%s'"
msgstr ""
-#: ../apt/debfile.py:507 ../apt/debfile.py:555 ../apt/debfile.py:566
+#: ../apt/debfile.py:507
msgid "Python-debian module not available"
msgstr ""
-#: ../apt/debfile.py:539
+#: ../apt/debfile.py:541
msgid ""
"Automatically decompressed:\n"
"\n"
msgstr ""
-#: ../apt/debfile.py:545
+#: ../apt/debfile.py:547
msgid "Automatically converted to printable ascii:\n"
msgstr ""
-#: ../apt/debfile.py:642
+#: ../apt/debfile.py:637
#, python-format
msgid "Install Build-Dependencies for source package '%s' that builds %s\n"
msgstr ""
-#: ../apt/debfile.py:652
+#: ../apt/debfile.py:647
msgid "An essential package would be removed"
msgstr ""
-#: ../apt/progress/text.py:81
+#: ../apt/progress/text.py:82
#, python-format
msgid "%c%s... Done"
msgstr ""
-#: ../apt/progress/text.py:120
+#: ../apt/progress/text.py:122
msgid "Hit "
msgstr ""
-#: ../apt/progress/text.py:129
+#: ../apt/progress/text.py:131
msgid "Ign "
msgstr ""
-#: ../apt/progress/text.py:131
+#: ../apt/progress/text.py:133
msgid "Err "
msgstr ""
-#: ../apt/progress/text.py:142
+#: ../apt/progress/text.py:144
msgid "Get:"
msgstr ""
-#: ../apt/progress/text.py:202
+#: ../apt/progress/text.py:204
msgid " [Working]"
msgstr ""
-#: ../apt/progress/text.py:213
+#: ../apt/progress/text.py:215
#, python-format
msgid ""
"Media change: please insert the disc labeled\n"
@@ -532,16 +562,16 @@ msgid ""
msgstr ""
#. Trick for getting a translation from apt
-#: ../apt/progress/text.py:222
+#: ../apt/progress/text.py:224
#, python-format
msgid "Fetched %sB in %s (%sB/s)\n"
msgstr ""
-#: ../apt/progress/text.py:238
+#: ../apt/progress/text.py:240
msgid "Please provide a name for this Disc, such as 'Debian 2.1r1 Disk 1'"
msgstr ""
-#: ../apt/progress/text.py:254
+#: ../apt/progress/text.py:256
msgid "Please insert a Disc in the drive and press enter"
msgstr ""
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 = {
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
--- /dev/null
+++ b/tests/data/test_debs/data-tar-xz.deb
Binary files 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()