From de62809269935415e37c50c49da6bdc7fabf0c00 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 9 Dec 2011 09:44:55 +0100 Subject: releasing version 0.8.3ubuntu1 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index a7318ce1..157b52ba 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,7 +11,7 @@ python-apt (0.8.3) unstable; urgency=low [ Michael Vogt ] * lp:~mvo/python-apt/debfile-multiarch: - - add multiarch support to the debfile.py code + - add multiarch support to the debfile.py code (LP: #854839) * tests/test_apt_cache.py: - add additional check if provides test can actually be run -- cgit v1.2.3 From 4527baed46ce0d3be4829deb7e972bc7fd6c34fd Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 9 Dec 2011 12:59:06 +0100 Subject: debian/control: Drop unnecessary Recommends: python2.6 again. --- debian/changelog | 6 ++++++ debian/control | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 157b52ba..25f8e15a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +python-apt (0.8.3ubuntu2) UNRELEASED; urgency=low + + * debian/control: Drop unnecessary Recommends: python2.6 again. + + -- Martin Pitt Fri, 09 Dec 2011 12:58:53 +0100 + python-apt (0.8.3ubuntu1) precise; urgency=low * merged from debian/sid diff --git a/debian/control b/debian/control index 31ca4d35..060badc6 100644 --- a/debian/control +++ b/debian/control @@ -24,7 +24,7 @@ XS-Debian-Vcs-Browser: http://bzr.debian.org/loggerhead/apt/python-apt/debian-si Package: python-apt Architecture: any Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}, python-apt-common -Recommends: lsb-release, iso-codes, python2.6, xz-lzma +Recommends: lsb-release, iso-codes, xz-lzma Breaks: packagekit-backend-apt (<= 0.4.8-0ubuntu4), computer-janitor (<< 1.14.1-1+), debdelta (<< 0.41+), -- cgit v1.2.3 From 2e908a2e8b5267436c5008222f14923a49a2ab74 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 9 Dec 2011 12:59:18 +0100 Subject: releasing version 0.8.3ubuntu2 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 25f8e15a..c7d0243a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -python-apt (0.8.3ubuntu2) UNRELEASED; urgency=low +python-apt (0.8.3ubuntu2) precise; urgency=low * debian/control: Drop unnecessary Recommends: python2.6 again. - -- Martin Pitt Fri, 09 Dec 2011 12:58:53 +0100 + -- Martin Pitt Fri, 09 Dec 2011 12:59:15 +0100 python-apt (0.8.3ubuntu1) precise; urgency=low -- cgit v1.2.3 From 02104e7cf55d6d17c074b1a8567d578abef82fb2 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 30 Jan 2012 11:01:38 +0100 Subject: rebuild against latest libapt --- debian/changelog | 6 ++++++ debian/control | 2 +- pre-build.sh | 5 +++-- 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c7d0243a..7db946c4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +python-apt (0.8.3ubuntu3) precise; urgency=low + + * rebuild against latest libapt + + -- Michael Vogt Mon, 30 Jan 2012 10:56:44 +0100 + python-apt (0.8.3ubuntu2) precise; urgency=low * debian/control: Drop unnecessary Recommends: python2.6 again. diff --git a/debian/control b/debian/control index 060badc6..d4fbfe01 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ XS-Python-Version: >= 2.6 X-Python3-Version: >= 3.1 Build-Depends: apt-utils, debhelper (>= 7.3.5), - libapt-pkg-dev (>= 0.8.11), + libapt-pkg-dev (>= 0.8.16~exp12), python-all-dev (>= 2.6.6-3~), python-all-dbg, python3-all-dev (>= 3.1.2-10~), diff --git a/pre-build.sh b/pre-build.sh index 026a491e..b23b3a34 100755 --- a/pre-build.sh +++ b/pre-build.sh @@ -7,5 +7,6 @@ if [ -n "$https_proxy" ]; then fi utils/get_ubuntu_mirrors_from_lp.py > data/templates/Ubuntu.mirrors -echo "updating Debian mirror list" -utils/get_debian_mirrors.py > data/templates/Debian.mirrors +# debian svn down so temporarely disabled +#echo "updating Debian mirror list" +#utils/get_debian_mirrors.py > data/templates/Debian.mirrors -- cgit v1.2.3 From 6efd88826d1069bf25c43e5bf14ad43bc459c3c7 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 14 Feb 2012 09:39:25 +0100 Subject: releasing version 0.8.3ubuntu4 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 8c4d1584..89951304 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -python-apt (0.8.3ubuntu4) UNRELEASED; urgency=low +python-apt (0.8.3ubuntu4) precise; urgency=low * doc/examples/build-deps.py: - update the build-deps.py example to use the apt API more @@ -18,7 +18,7 @@ python-apt (0.8.3ubuntu4) UNRELEASED; urgency=low * apt/debfile.py: - fix crash in dep multiarch handling - -- Michael Vogt Fri, 09 Dec 2011 09:23:16 +0100 + -- Michael Vogt Tue, 14 Feb 2012 09:37:18 +0100 python-apt (0.8.3ubuntu3) precise; urgency=low -- cgit v1.2.3 From b372d5e58e5850d6a8a933ac6a2bc46d02e56225 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 27 Mar 2012 13:36:44 +0200 Subject: releasing version 0.8.3ubuntu5 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c2be4163..88d3d58b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -python-apt (0.8.3ubuntu5) unstable; urgency=low +python-apt (0.8.3ubuntu5) precise; urgency=low [ Michael Vogt ] * apt/package.py: -- cgit v1.2.3 From cba98cf0f6c09c91e8f4a7f5673cf1c85fab5e81 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 2 Apr 2012 14:38:41 +0200 Subject: releasing version 0.8.3ubuntu6 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index dae69320..b8c5b25d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -python-apt (0.8.3ubuntu6) UNRELEASED; urgency=low +python-apt (0.8.3ubuntu6) precise; urgency=low * apt/cache.py: - fix _have_multi_arch flag (thanks to Sebastian Heinlein) LP: #966916 - -- Michael Vogt Wed, 28 Mar 2012 10:25:18 +0200 + -- Michael Vogt Mon, 02 Apr 2012 14:33:50 +0200 python-apt (0.8.3ubuntu5) precise; urgency=low -- cgit v1.2.3 From e85675833d628dd6c3a54f7c0aaf88b106909f53 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 18 Apr 2012 10:31:13 +0200 Subject: releasing version 0.8.3ubuntu7 --- debian/changelog | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 5d98f7d1..ef278a3c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,19 +1,12 @@ -python-apt (0.8.4ubuntu5) UNRELEASEDprecise; urgency=low +python-apt (0.8.3ubuntu7) precise; urgency=low [ Michael Vogt ] * python/cache.cc: - ensure that pkgApplyStatus is called when the cache is opened - (thanks to Sebastian Heinlein for finding this bug), LP: #659438 - * apt/package.py: - - if there is no Version.uri return None - * apt/cache.py: - - fix _have_multi_arch flag (thanks to Sebastian Heinlein) - - [Julian Andres Klode ] - * python/apt_pkgmodule.cc: - - Fix apt_pkg.Dependency.TYPE_RECOMMENDS, had Suggests value previously + Thanks to Sebastian Heinlein for finding this bug, providing a fix + and adding a regression test, LP: #659438 - -- Michael Vogt Wed, 18 Apr 2012 10:20:58 +0200 + -- Michael Vogt Wed, 18 Apr 2012 10:26:06 +0200 python-apt (0.8.3ubuntu6) precise; urgency=low -- cgit v1.2.3 From 07aa1e7881b5e66fce1d4504b356f2b2330495d8 Mon Sep 17 00:00:00 2001 From: Stéphane Graber Date: Wed, 2 May 2012 21:09:49 -0400 Subject: releasing version 0.8.3ubuntu8 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index ef278a3c..6117d1aa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +python-apt (0.8.3ubuntu8) quantal; urgency=low + + * data/templates/Ubuntu.info.in: + - add quantal + + -- Stéphane Graber Wed, 02 May 2012 21:09:05 -0400 + python-apt (0.8.3ubuntu7) precise; urgency=low [ Michael Vogt ] -- cgit v1.2.3 From 248de65b8195f33c096704bab9ee9b9bee807784 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Tue, 12 Jun 2012 01:53:24 +0100 Subject: aptsources/*.py, setup.py: Make aptsources modules work directly in either Python 2 or 3, and exclude the "future" 2to3 fixer so that 2to3 doesn't need to modify them. This makes life a little easier for the strange tricks update-manager plays with its dist-upgrader tarball. --- aptsources/distinfo.py | 18 ++++++++++-------- aptsources/distro.py | 6 ++++-- aptsources/sourceslist.py | 4 +++- debian/changelog | 7 +++++++ setup.py | 4 ++++ 5 files changed, 28 insertions(+), 11 deletions(-) (limited to 'debian') diff --git a/aptsources/distinfo.py b/aptsources/distinfo.py index ddaeb218..e0ee915d 100644 --- a/aptsources/distinfo.py +++ b/aptsources/distinfo.py @@ -21,6 +21,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA +from __future__ import print_function + import errno import logging import os @@ -51,7 +53,7 @@ class Template(object): def has_component(self, comp): ''' Check if the distribution provides the given component ''' - return comp in map(lambda c: c.name, self.components) + return comp in (c.name for c in self.components) def is_mirror(self, url): ''' Check if a given url of a repository is a valid mirror ''' @@ -107,7 +109,7 @@ class Mirror(object): self.repositories.append(Repository(proto, dir)) def get_repositories_for_proto(self, proto): - return filter(lambda r: r.proto == proto, self.repositories) + return [r for r in self.repositories if r.proto == proto] def has_repository(self, proto, dir): if dir is None: @@ -118,7 +120,7 @@ class Mirror(object): return False def get_repo_urls(self): - return map(lambda r: r.get_url(self.hostname), self.repositories) + return [r.get_url(self.hostname) for r in self.repositories] def get_location(self): return self.location @@ -230,11 +232,11 @@ class DistInfo(object): mirror_set = {} try: with open(value) as value_f: - mirror_data = filter(match_mirror_line.match, - [x.strip() for x in - value_f]) + mirror_data = list(filter( + match_mirror_line.match, + [x.strip() for x in value_f])) except Exception: - print "WARNING: Failed to read mirror file" + print("WARNING: Failed to read mirror file") mirror_data = [] for line in mirror_data: if line.startswith("#LOC:"): @@ -298,7 +300,7 @@ if __name__ == "__main__": logging.info("BaseURI: %s" % template.base_uri) logging.info("MatchURI: %s" % template.match_uri) if template.mirror_set != {}: - logging.info("Mirrors: %s" % template.mirror_set.keys()) + logging.info("Mirrors: %s" % list(template.mirror_set.keys())) for comp in template.components: logging.info(" %s -%s -%s" % (comp.name, comp.description, diff --git a/aptsources/distro.py b/aptsources/distro.py index 27d7f859..ca87a919 100644 --- a/aptsources/distro.py +++ b/aptsources/distro.py @@ -327,12 +327,14 @@ class Distribution(object): if s.type == self.binary_type: if s.dist not in comps_per_dist: comps_per_dist[s.dist] = set() - map(comps_per_dist[s.dist].add, s.comps) + for c in s.comps: + comps_per_dist[s.dist].add(c) for s in self.source_code_sources: if s.type == self.source_type: if s.dist not in comps_per_sdist: comps_per_sdist[s.dist] = set() - map(comps_per_sdist[s.dist].add, s.comps) + for c in s.comps: + comps_per_sdist[s.dist].add(c) # check if there is a main source at all if len(self.main_sources) < 1: diff --git a/aptsources/sourceslist.py b/aptsources/sourceslist.py index 03377258..61b75f75 100644 --- a/aptsources/sourceslist.py +++ b/aptsources/sourceslist.py @@ -23,6 +23,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA +from __future__ import absolute_import + import glob import logging import os.path @@ -31,7 +33,7 @@ import shutil import time import apt_pkg -from distinfo import DistInfo +from .distinfo import DistInfo from apt.deprecation import function_deprecated_by #from apt_pkg import gettext as _ diff --git a/debian/changelog b/debian/changelog index 03472eae..6deeab08 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,17 @@ python-apt (0.8.3ubuntu9) UNRELEASED; urgency=low + [ Steve Langasek ] * utils/get_ubuntu_mirrors_from_lp.py: move this script to python3 * pre-build.sh: call dpkg-checkbuilddeps with the list of our source-build-dependencies; this may save someone else an hour down the line scratching their head over gratuitous test-suite failures... + [ Colin Watson ] + * aptsources/*.py, setup.py: Make aptsources modules work directly in + either Python 2 or 3, and exclude the "future" 2to3 fixer so that 2to3 + doesn't need to modify them. This makes life a little easier for the + strange tricks update-manager plays with its dist-upgrader tarball. + -- Steve Langasek Mon, 11 Jun 2012 13:48:06 -0700 python-apt (0.8.3ubuntu8) quantal; urgency=low diff --git a/setup.py b/setup.py index eff78379..8af5c2a6 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,11 @@ except ImportError: if sys.version_info[0] == 3: from distutils.command.build_py import build_py_2to3 + from lib2to3.refactor import get_fixers_from_package cmdclass['build_py'] = build_py_2to3 + cmdclass['build_py'].fixer_names = sorted( + set(get_fixers_from_package("lib2to3.fixes")) - + set(["lib2to3.fixes.fix_future"])) # The apt_pkg module. files = ['apt_pkgmodule.cc', 'acquire.cc', 'cache.cc', 'cdrom.cc', -- cgit v1.2.3 From 3a49e17de7e494eb8e648d5cce62ee56434b0c16 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Tue, 12 Jun 2012 08:19:12 -0700 Subject: Revert change from lp:~ev/python-apt/dont-leak-fds; as discussed on IRC during the Python3 porting sprint, the cure here is worse than the disease. --- apt/progress/base.py | 4 ---- debian/changelog | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/apt/progress/base.py b/apt/progress/base.py index 88b1ad21..4943978c 100644 --- a/apt/progress/base.py +++ b/apt/progress/base.py @@ -146,10 +146,6 @@ class InstallProgress(object): self.status_stream = os.fdopen(self.statusfd, "r") fcntl.fcntl(self.statusfd, fcntl.F_SETFL, os.O_NONBLOCK) - def __del__(self): - self.write_stream.close() - self.status_stream.close() - def start_update(self): """(Abstract) Start update.""" diff --git a/debian/changelog b/debian/changelog index ab2fae38..9cff1ff0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,9 @@ python-apt (0.8.5~ubuntu1) UNRELEASED; urgency=low - build with COMPAT_0_7, which might still be needed by some code in the Ubuntu archive. We need to scan the archive for this, add liberal Breaks, and analyze the dist-upgrader case before disabling. + * Revert change from lp:~ev/python-apt/dont-leak-fds; as discussed on IRC + during the Python3 porting sprint, the cure here is worse than the + disease. [ Colin Watson ] * aptsources/*.py, setup.py: Make aptsources modules work directly in -- cgit v1.2.3 From 39fa75ddca331f93e51bb3c65a32bfbf92b8266e Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Tue, 12 Jun 2012 08:22:49 -0700 Subject: Colin's changes are on the Debian branch, credit them accordingly in the changelog --- debian/changelog | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 9cff1ff0..83491d8e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,12 +9,6 @@ python-apt (0.8.5~ubuntu1) UNRELEASED; urgency=low during the Python3 porting sprint, the cure here is worse than the disease. - [ Colin Watson ] - * aptsources/*.py, setup.py: Make aptsources modules work directly in - either Python 2 or 3, and exclude the "future" 2to3 fixer so that 2to3 - doesn't need to modify them. This makes life a little easier for the - strange tricks update-manager plays with its dist-upgrader tarball. - -- Steve Langasek Mon, 11 Jun 2012 13:48:06 -0700 python-apt (0.8.5) UNRELEASED; urgency=low @@ -42,6 +36,12 @@ python-apt (0.8.5) UNRELEASED; urgency=low - this is a port of the software-properties AptAuth module to python-apt with some cleanups. It provides a wrapper API for the apt-key command + [ Colin Watson ] + * aptsources/*.py, setup.py: Make aptsources modules work directly in + either Python 2 or 3, and exclude the "future" 2to3 fixer so that 2to3 + doesn't need to modify them. This makes life a little easier for the + strange tricks update-manager plays with its dist-upgrader tarball. + -- Michael Vogt Tue, 17 Apr 2012 14:09:24 +0200 python-apt (0.8.3ubuntu8) quantal; urgency=low -- cgit v1.2.3 From a8262ad909e4596da19210f22d872d59fe4b1ae2 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Tue, 12 Jun 2012 08:23:12 -0700 Subject: releasing version 0.8.5~ubuntu1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 83491d8e..762059a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -python-apt (0.8.5~ubuntu1) UNRELEASED; urgency=low +python-apt (0.8.5~ubuntu1) quantal-proposed; urgency=low * Merge from unreleased Debian branch, remaining changes: - drop recommends on python2.6 @@ -9,7 +9,7 @@ python-apt (0.8.5~ubuntu1) UNRELEASED; urgency=low during the Python3 porting sprint, the cure here is worse than the disease. - -- Steve Langasek Mon, 11 Jun 2012 13:48:06 -0700 + -- Steve Langasek Tue, 12 Jun 2012 08:23:06 -0700 python-apt (0.8.5) UNRELEASED; urgency=low -- cgit v1.2.3 From 96b0facc6e57a39ad82f31bb1f248f0b8eed84ba Mon Sep 17 00:00:00 2001 From: Adam Conrad Date: Tue, 19 Jun 2012 19:29:03 -0600 Subject: xz-lzma has been rolled into xz-utils, as of 5.1.1alpha+20120614-1 --- debian/changelog | 6 ++++++ debian/control | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 762059a0..4cd171fc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +python-apt (0.8.5~ubuntu2) quantal; urgency=low + + * xz-lzma has been rolled into xz-utils, as of 5.1.1alpha+20120614-1 + + -- Adam Conrad Tue, 19 Jun 2012 19:12:18 -0600 + python-apt (0.8.5~ubuntu1) quantal-proposed; urgency=low * Merge from unreleased Debian branch, remaining changes: diff --git a/debian/control b/debian/control index 58136b9a..46580333 100644 --- a/debian/control +++ b/debian/control @@ -24,7 +24,7 @@ XS-Debian-Vcs-Browser: http://bzr.debian.org/loggerhead/apt/python-apt/debian-si Package: python-apt Architecture: any Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}, python-apt-common -Recommends: lsb-release, iso-codes, xz-lzma +Recommends: lsb-release, iso-codes, xz-utils (>= 5.1.1alpha+20120614-1) Breaks: packagekit-backend-apt (<= 0.4.8-0ubuntu4), computer-janitor (<< 1.14.1-1+), debdelta (<< 0.41+), -- cgit v1.2.3 From cef90610bf1bd56da9f94ed4f848b08e0203f532 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 14 Aug 2012 14:08:22 +0200 Subject: * python/cache.cc: - add "Codename" to PackageFile object --- debian/changelog | 2 ++ python/cache.cc | 8 ++++++++ 2 files changed, 10 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 4cb74abc..d13335ad 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ python-apt (0.8.6) unstable; urgency=low * debian/control: - add build-dep for apt (>= 0.9.6) to make test_auth.py test work reliable + * python/cache.cc: + - add "Codename" to PackageFile object [ Julian Andres Klode ] * apt/auth.py: diff --git a/python/cache.cc b/python/cache.cc index c51bd4af..a1a865af 100644 --- a/python/cache.cc +++ b/python/cache.cc @@ -1247,6 +1247,12 @@ static PyObject *PackageFile_GetArchitecture(PyObject *Self,void*) return Safe_FromString(File.Architecture()); } +static PyObject *PackageFile_GetCodename(PyObject *Self,void*) +{ + pkgCache::PkgFileIterator &File = GetCpp(Self); + return Safe_FromString(File.Codename()); +} + static PyObject *PackageFile_GetSite(PyObject *Self,void*) { pkgCache::PkgFileIterator &File = GetCpp(Self); @@ -1305,6 +1311,8 @@ static PyGetSetDef PackageFileGetSet[] = { "The archive of the package file (i.e. 'Suite' in the Release file)."}, {"component",PackageFile_GetComponent,0, "The component of this package file (e.g. 'main')."}, + {"codename",PackageFile_GetCodename,0, + "The codename of this package file (e.g. squeeze-updates)."}, {"filename",PackageFile_GetFileName,0, "The path to the file."}, {"id",PackageFile_GetID,0, -- cgit v1.2.3 From 27af3b98010fdf04b3f5179c2197bf0516c9f740 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 1 Oct 2012 13:49:05 +0200 Subject: releasing version 0.8.7ubuntu1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index b0f6b0e5..fe5257b7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -python-apt (0.8.7ubuntu1) UNRELEASEDquantal; urgency=low +python-apt (0.8.7ubuntu1) quantal; urgency=low [ James Hunt ] * python/cache.cc: PkgCacheGetIsMultiArch(): Return calculated @@ -7,7 +7,7 @@ python-apt (0.8.7ubuntu1) UNRELEASEDquantal; urgency=low [ Michael Vogt ] * merged fixes from the debian-sid branch - -- Michael Vogt Mon, 01 Oct 2012 13:36:04 +0200 + -- Michael Vogt Mon, 01 Oct 2012 13:47:43 +0200 python-apt (0.8.8) UNRELEASED; urgency=low -- cgit v1.2.3 From 770a3f02b460e665c35e2f9f0cd2b3c275a08bbc Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 2 Oct 2012 11:35:59 +0200 Subject: releasing version 0.8.7ubuntu3 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 8c391cad..590f9a23 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,7 +7,7 @@ python-apt (0.8.7ubuntu3) quantal; urgency=low * lp:~mvo/python-apt/fix-debfile-crash: - fix crash on missing candidates in the multiarch check - -- Michael Vogt Tue, 02 Oct 2012 11:24:21 +0200 + -- Michael Vogt Tue, 02 Oct 2012 11:35:02 +0200 python-apt (0.8.7ubuntu2) quantal; urgency=low -- cgit v1.2.3 From 6b1a7dd97a6d5e47975a02228b4a8824aee32563 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 10 Oct 2012 12:36:26 +0200 Subject: * apt/auth.py: - do not fail to import keys that start with "0x" --- apt/auth.py | 3 ++- debian/changelog | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/apt/auth.py b/apt/auth.py index 742b5cc2..9d001af0 100644 --- a/apt/auth.py +++ b/apt/auth.py @@ -175,7 +175,8 @@ def _add_key_from_keyserver(keyid, keyserver, tmp_keyring_dir): got_fingerprint = line.split(":")[9] # stop after the first to ensure no subkey trickery break - signing_key_fingerprint = keyid + # strip the leading "0x" is there is one + signing_key_fingerprint = keyid.replace("0x", "") if got_fingerprint != signing_key_fingerprint: raise AptKeyError( "Fingerprints do not match, not importing: '%s' != '%s'" % ( diff --git a/debian/changelog b/debian/changelog index 590f9a23..274dd3ec 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +python-apt (0.8.7ubuntu4) UNRELEASED; urgency=low + + * apt/auth.py: + - do not fail to import keys that start with "0x" + + -- Michael Vogt Wed, 10 Oct 2012 12:35:59 +0200 + python-apt (0.8.7ubuntu3) quantal; urgency=low * lp:~mvo/python-apt/recv-key-lp1016643: -- cgit v1.2.3 From fbc1eb3e01df0dad1779ff723018936b4a0a5921 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 10 Oct 2012 16:11:58 +0200 Subject: releasing version 0.8.7ubuntu4 --- debian/changelog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 274dd3ec..62450591 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -python-apt (0.8.7ubuntu4) UNRELEASED; urgency=low +python-apt (0.8.7ubuntu4) quantal; urgency=low * apt/auth.py: - - do not fail to import keys that start with "0x" + - do not fail to import keys that start with "0x" (LP: #1065015) - -- Michael Vogt Wed, 10 Oct 2012 12:35:59 +0200 + -- Michael Vogt Wed, 10 Oct 2012 15:55:55 +0200 python-apt (0.8.7ubuntu3) quantal; urgency=low -- cgit v1.2.3 From 8c8d4e74191c7419ae12d551269e494b58e44281 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 12 Oct 2012 10:22:39 +0200 Subject: add dep8 style tests --- debian/control | 1 + debian/tests/control | 2 ++ debian/tests/run-tests | 8 ++++++++ 3 files changed, 11 insertions(+) create mode 100644 debian/tests/control create mode 100644 debian/tests/run-tests (limited to 'debian') diff --git a/debian/control b/debian/control index ca32cb3b..5e85183d 100644 --- a/debian/control +++ b/debian/control @@ -20,6 +20,7 @@ Build-Depends: apt (>= 0.9.6), python-debian Vcs-Bzr: http://bzr.debian.org/apt/python-apt/debian-sid Vcs-Browser: http://bzr.debian.org/loggerhead/apt/python-apt/debian-sid/changes +XS-Testsuite: autopkgtest Package: python-apt Architecture: any diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 00000000..0457372b --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,2 @@ +Tests: run-tests +Depends: @, apt, apt-utils, python-debian \ No newline at end of file diff --git a/debian/tests/run-tests b/debian/tests/run-tests new file mode 100644 index 00000000..bb980c6b --- /dev/null +++ b/debian/tests/run-tests @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +# from debian/rules +for python in $(utils/pyversions -r); do + $python tests/test_all.py -q +done -- cgit v1.2.3 From 43d87e1b14719750585412ab1d15fc30e280b7d0 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 12 Oct 2012 10:58:08 +0200 Subject: debian/tests/control: update depends line --- debian/tests/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/tests/control b/debian/tests/control index 0457372b..2ca0a401 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,2 +1,2 @@ Tests: run-tests -Depends: @, apt, apt-utils, python-debian \ No newline at end of file +Depends: @, apt-utils, python-debian, fakeroot, intltool -- cgit v1.2.3 From 01a05d8689621df4c9983be315b864142bb8077a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 12 Oct 2012 11:11:14 +0200 Subject: debian/changelog: add note for future uploaders --- debian/changelog | 3 +++ 1 file changed, 3 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 15b445d6..d76cc746 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,8 @@ python-apt (0.8.8ubuntu1) UNRELEASED; urgency=low + NOTE: THIS is intended for R, use lp:~ubuntu-core-dev/python-apt/quantal + for quantal (and remove this note on the first R upload ;) + * merged from the debian-sid branch: - do not build-depend on python-unittest2, only needed for python2.6 * add dep8 style autopkgtest support -- cgit v1.2.3 From fafe0098d1afdfdd7c491fd814286b0c3ea03486 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 15 Oct 2012 11:01:50 +0200 Subject: update changelog --- debian/changelog | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 31ac7b45..1cb722b6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,9 @@ python-apt (0.8.8.1) UNRELEASED; urgency=low * python/tag.cc: - make TagSecString_FromStringAndSize, TagSecString_FromString static, thanks to jcristau + * python/cache.cc: + - add "Codename" to PackageFile object + * add dep8 style autopkgtest support -- Michael Vogt Mon, 15 Oct 2012 10:03:21 +0200 @@ -68,8 +71,6 @@ python-apt (0.8.6) unstable; urgency=low * debian/control: - add build-dep for apt (>= 0.9.6) to make test_auth.py test work reliable - * python/cache.cc: - - add "Codename" to PackageFile object [ Julian Andres Klode ] * apt/auth.py: -- cgit v1.2.3 From 7a7722a91bd80572daf5d5f7f377b7b189e533bf Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 15 Oct 2012 11:17:34 +0200 Subject: add changelog for lp:~jconti/python-apt/closeable-cache and add new test "test_cache_close_download_fails" --- debian/changelog | 5 +++++ tests/test_apt_cache.py | 30 +++++++++++++++++++++++------- 2 files changed, 28 insertions(+), 7 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 1cb722b6..0e8ca556 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,16 @@ python-apt (0.8.8.1) UNRELEASED; urgency=low + [ Michael Vogt ] * python/tag.cc: - make TagSecString_FromStringAndSize, TagSecString_FromString static, thanks to jcristau * python/cache.cc: - add "Codename" to PackageFile object * add dep8 style autopkgtest support + + [ Jason Conti ] + * lp:~jconti/python-apt/closeable-cache: + - add apt.Cache.close() method -- Michael Vogt Mon, 15 Oct 2012 10:03:21 +0200 diff --git a/tests/test_apt_cache.py b/tests/test_apt_cache.py index fc429cf3..c850cec2 100644 --- a/tests/test_apt_cache.py +++ b/tests/test_apt_cache.py @@ -16,6 +16,12 @@ import sys import tempfile import unittest +if sys.version_info[0] == 2 and sys.version_info[1] == 6: + from unittest2 import TestCase +else: + from unittest import TestCase + + from test_all import get_library_dir sys.path.insert(0, get_library_dir()) @@ -41,7 +47,7 @@ def get_open_file_descriptors(): return set(map(int, fds)) -class TestAptCache(unittest.TestCase): +class TestAptCache(TestCase): """ test the apt cache """ def setUp(self): @@ -80,18 +86,28 @@ class TestAptCache(unittest.TestCase): self.assertEqual(r['Package'], pkg.shortname) self.assertTrue('Version' in r) self.assertTrue(len(r['Description']) > 0) - self.assertTrue(str(r).startswith('Package: %s\n' % pkg.shortname)) + self.assertTrue( + str(r).startswith('Package: %s\n' % pkg.shortname)) @if_sources_list_is_readable - def test_closeable_cache(self): - fd_0 = get_open_file_descriptors() + def test_cache_close_leak_fd(self): + fds_before_open = get_open_file_descriptors() cache = apt.Cache() - opened_fd = get_open_file_descriptors().difference(fd_0) + opened_fd = get_open_file_descriptors().difference(fds_before_open) cache.close() - fd_1 = get_open_file_descriptors() - unclosed_fd = opened_fd.intersection(fd_1) + fds_after_close = get_open_file_descriptors() + unclosed_fd = opened_fd.intersection(fds_after_close) + self.assertEqual(fds_before_open, fds_after_close) self.assertEqual(unclosed_fd, set()) + @if_sources_list_is_readable + def test_cache_close_download_fails(self): + cache = apt.Cache() + self.assertEqual(cache.required_download, 0) + cache.close() + with self.assertRaises(apt.cache.CacheClosedException): + cache.required_download + def test_get_provided_packages(self): apt.apt_pkg.config.set("Apt::architecture", "i386") cache = apt.Cache(rootdir="./data/test-provides/") -- cgit v1.2.3 From 6bd628c370b05b80b59552e4bbc970928aca91a1 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 23 Oct 2012 12:37:49 +0200 Subject: build fixes for python3.3 --- apt/auth.py | 3 ++- debian/changelog | 3 ++- python/generic.h | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/apt/auth.py b/apt/auth.py index eff13b1a..c1b8da2a 100644 --- a/apt/auth.py +++ b/apt/auth.py @@ -78,7 +78,8 @@ def _call_apt_key_script(*args, **kwargs): stderr=subprocess.PIPE) content = kwargs.get("stdin", None) - if isinstance(content, unicode): + # py2 needs this encoded, py3.3 will crash if it is + if isinstance(content, unicode) and sys.version_info[:2] < (3, 3): content = content.encode("utf-8") output, stderr = proc.communicate(content) diff --git a/debian/changelog b/debian/changelog index 0e8ca556..5d0b3900 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,7 +7,8 @@ python-apt (0.8.8.1) UNRELEASED; urgency=low * python/cache.cc: - add "Codename" to PackageFile object * add dep8 style autopkgtest support - + * build fixes for python3.3 + [ Jason Conti ] * lp:~jconti/python-apt/closeable-cache: - add apt.Cache.close() method diff --git a/python/generic.h b/python/generic.h index f9680ca5..914456e2 100644 --- a/python/generic.h +++ b/python/generic.h @@ -80,10 +80,14 @@ typedef int Py_ssize_t; static inline const char *PyUnicode_AsString(PyObject *op) { // Convert to bytes object, using the default encoding. +#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3 + return PyUnicode_AsUTF8(op); +#else // Use Python-internal API, there is no other way to do this // without a memory leak. PyObject *bytes = _PyUnicode_AsDefaultEncodedString(op, 0); return bytes ? PyBytes_AS_STRING(bytes) : 0; +#endif } // Convert any type of string based object to a const char. -- cgit v1.2.3 From 2675db362167b75b1c006e7a165890e2b67079ec Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 23 Oct 2012 12:46:15 +0200 Subject: * data/templates/Ubuntu.info.in: - add raring --- data/templates/Ubuntu.info.in | 127 ++++++++++++++++++++++++++++++++++++++++-- debian/changelog | 2 + 2 files changed, 125 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/data/templates/Ubuntu.info.in b/data/templates/Ubuntu.info.in index 2aba269e..a3fc1bec 100644 --- a/data/templates/Ubuntu.info.in +++ b/data/templates/Ubuntu.info.in @@ -1,5 +1,124 @@ _ChangelogURI: http://changelogs.ubuntu.com/changelogs/pool/%s/%s/%s/%s_%s/changelog +Suite: raring +RepositoryType: deb +BaseURI: http://ports.ubuntu.com/ubuntu-ports/ +MatchURI: ports.ubuntu.com/ubuntu-ports +BaseURI-amd64: http://archive.ubuntu.com/ubuntu +MatchURI-amd64: archive.ubuntu.com/ubuntu +BaseURI-i386: http://archive.ubuntu.com/ubuntu +MatchURI-i386: archive.ubuntu.com/ubuntu +MirrorsFile-amd64: Ubuntu.mirrors +MirrorsFile-i386: Ubuntu.mirrors +_Description: Ubuntu 13.04 'Raring Ringtail' +Component: main +_CompDescription: Officially supported +_CompDescriptionLong: Canonical-supported free and open-source software +Component: universe +_CompDescription: Community-maintained +_CompDescriptionLong: Community-maintained free and open-source software +Component: restricted +_CompDescription: Non-free drivers +_CompDescriptionLong: Proprietary drivers for devices +Component: multiverse +ParentComponent: universe +_CompDescription: Restricted software +_CompDescriptionLong: Software restricted by copyright or legal issues + +Suite: raring +ParentSuite: raring +RepositoryType: deb-src +BaseURI: http://archive.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu|ports.ubuntu.com/ubuntu-ports +_Description: Ubuntu 12.04 'Precise Pangolin' + +Suite: raring +RepositoryType: deb +MatchName: .* +BaseURI: cdrom:\[Ubuntu.*13.04 +MatchURI: cdrom:\[Ubuntu.*13.04 +_Description: Cdrom with Ubuntu 12.04 'Raring Ringtail' +Available: False +Component: main +_CompDescription: Officially supported +Component: restricted +_CompDescription: Restricted copyright + +Suite: raring +Official: false +RepositoryType: deb +BaseURI: http://archive.canonical.com +MatchURI: archive.canonical.com +_Description: Canonical Partners +Component: partner +_CompDescription: Software packaged by Canonical for their partners +_CompDescriptionLong: This software is not part of Ubuntu. + +Suite: raring +Official: false +RepositoryType: deb +BaseURI: http://extras.ubuntu.com +MatchURI: extras.ubuntu.com +_Description: Independent +Component: main +_CompDescription: Provided by third-party software developers +_CompDescriptionLong: Software offered by third party developers. + +Suite: raring-security +ParentSuite: raring +RepositoryType: deb +BaseURI: http://ports.ubuntu.com/ubuntu-ports/ +MatchURI: ports.ubuntu.com/ubuntu-ports +BaseURI-amd64: http://security.ubuntu.com/ubuntu/ +MatchURI-amd64: archive.ubuntu.com/ubuntu|security.ubuntu.com +BaseURI-i386: http://security.ubuntu.com/ubuntu/ +MatchURI-i386: archive.ubuntu.com/ubuntu|security.ubuntu.com +_Description: Important security updates + +Suite: raring-security +ParentSuite: raring +RepositoryType: deb-src +BaseURI: http://archive.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu|ports.ubuntu.com/ubuntu-ports|security.ubuntu.com +_Description: Important security updates + +Suite: raring-updates +ParentSuite: raring +RepositoryType: deb +_Description: Recommended updates + +Suite: raring-updates +ParentSuite: raring +RepositoryType: deb-src +BaseURI: http://archive.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu|ports.ubuntu.com/ubuntu-ports +_Description: Recommended updates + +Suite: raring-proposed +ParentSuite: raring +RepositoryType: deb +_Description: Pre-released updates + +Suite: raring-proposed +ParentSuite: raring +RepositoryType: deb-src +BaseURI: http://archive.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu|ports.ubuntu.com/ubuntu-ports +_Description: Pre-released updates + +Suite: raring-backports +ParentSuite: raring +RepositoryType: deb +_Description: Unsupported updates + +Suite: raring-backports +ParentSuite: raring +RepositoryType: deb-src +BaseURI: http://archive.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu|ports.ubuntu.com/ubuntu-ports +_Description: Unsupported updates + + Suite: quantal RepositoryType: deb BaseURI: http://ports.ubuntu.com/ubuntu-ports/ @@ -30,14 +149,14 @@ ParentSuite: quantal RepositoryType: deb-src BaseURI: http://archive.ubuntu.com/ubuntu/ MatchURI: archive.ubuntu.com/ubuntu|ports.ubuntu.com/ubuntu-ports -_Description: Ubuntu 12.04 'Precise Pangolin' +_Description: Ubuntu 12.10 'Quantal Quetzal' Suite: quantal RepositoryType: deb MatchName: .* -BaseURI: cdrom:\[Ubuntu.*12.04 -MatchURI: cdrom:\[Ubuntu.*12.04 -_Description: Cdrom with Ubuntu 12.04 'Precise Pangolin' +BaseURI: cdrom:\[Ubuntu.*12.10 +MatchURI: cdrom:\[Ubuntu.*12.10 +_Description: Cdrom with Ubuntu 12.10 'Quantal Quetzal' Available: False Component: main _CompDescription: Officially supported diff --git a/debian/changelog b/debian/changelog index 7fba9286..6258fa45 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ python-apt (0.8.8.1~exp1) UNRELEASED; urgency=low - add "Codename" to PackageFile object * add dep8 style autopkgtest support * build fixes for python3.3 + * data/templates/Ubuntu.info.in: + - add raring [ Jason Conti ] * lp:~jconti/python-apt/closeable-cache: -- cgit v1.2.3 From 18d0047b7509a54889b3fd0c7088efcb419d42e8 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 23 Oct 2012 13:00:43 +0200 Subject: releasing version 0.8.8ubuntu1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 1da809b5..aa3cdc3a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -python-apt (0.8.8ubuntu1) UNRELEASEDraring; urgency=low +python-apt (0.8.8ubuntu1) raring; urgency=low [ Michael Vogt ] * merged from the debian-sid branch: @@ -18,7 +18,7 @@ python-apt (0.8.8ubuntu1) UNRELEASEDraring; urgency=low * lp:~jconti/python-apt/closeable-cache: - add apt.Cache.close() method - -- Michael Vogt Tue, 23 Oct 2012 12:49:21 +0200 + -- Michael Vogt Tue, 23 Oct 2012 12:58:13 +0200 python-apt (0.8.8) unstable; urgency=low -- cgit v1.2.3 From 3c2bb5b3013cec259074271345ddc34a3bc15631 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Wed, 7 Nov 2012 13:14:05 +0000 Subject: * data/templates/Ubuntu.info.in: - Fix descriptions of quantal and raring. --- data/templates/Ubuntu.info.in | 6 +++--- debian/changelog | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/data/templates/Ubuntu.info.in b/data/templates/Ubuntu.info.in index a3fc1bec..567456b3 100644 --- a/data/templates/Ubuntu.info.in +++ b/data/templates/Ubuntu.info.in @@ -30,14 +30,14 @@ ParentSuite: raring RepositoryType: deb-src BaseURI: http://archive.ubuntu.com/ubuntu/ MatchURI: archive.ubuntu.com/ubuntu|ports.ubuntu.com/ubuntu-ports -_Description: Ubuntu 12.04 'Precise Pangolin' +_Description: Ubuntu 13.04 'Raring Ringtail' Suite: raring RepositoryType: deb MatchName: .* BaseURI: cdrom:\[Ubuntu.*13.04 MatchURI: cdrom:\[Ubuntu.*13.04 -_Description: Cdrom with Ubuntu 12.04 'Raring Ringtail' +_Description: Cdrom with Ubuntu 13.04 'Raring Ringtail' Available: False Component: main _CompDescription: Officially supported @@ -129,7 +129,7 @@ BaseURI-i386: http://archive.ubuntu.com/ubuntu MatchURI-i386: archive.ubuntu.com/ubuntu MirrorsFile-amd64: Ubuntu.mirrors MirrorsFile-i386: Ubuntu.mirrors -_Description: Ubuntu 12.04 'Precise Pangolin' +_Description: Ubuntu 12.10 'Quantal Quetzal' Component: main _CompDescription: Officially supported _CompDescriptionLong: Canonical-supported free and open-source software diff --git a/debian/changelog b/debian/changelog index aa3cdc3a..deaf55b4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +python-apt (0.8.8ubuntu2) UNRELEASED; urgency=low + + * data/templates/Ubuntu.info.in: + - Fix descriptions of quantal and raring. + + -- Colin Watson Wed, 07 Nov 2012 13:13:08 +0000 + python-apt (0.8.8ubuntu1) raring; urgency=low [ Michael Vogt ] -- cgit v1.2.3 From fa16b6080a70edbae5b32ca08bafba212d5bafec Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Wed, 7 Nov 2012 13:24:31 +0000 Subject: releasing version 0.8.8ubuntu2 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index deaf55b4..7879fef8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -python-apt (0.8.8ubuntu2) UNRELEASED; urgency=low +python-apt (0.8.8ubuntu2) raring; urgency=low * data/templates/Ubuntu.info.in: - Fix descriptions of quantal and raring. - -- Colin Watson Wed, 07 Nov 2012 13:13:08 +0000 + -- Colin Watson Wed, 07 Nov 2012 13:16:33 +0000 python-apt (0.8.8ubuntu1) raring; urgency=low -- cgit v1.2.3 From 4e9e2c06c3016703b0e90b2435e672e8774bfedd Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Thu, 8 Nov 2012 15:03:12 +0000 Subject: * tests/test_lp659438.py: - Add an Architecture: line to the test Packages file so that apt doesn't get upset with it. --- debian/changelog | 8 ++++++++ tests/test_lp659438.py | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 7879fef8..efcae83b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +python-apt (0.8.8ubuntu3) UNRELEASED; urgency=low + + * tests/test_lp659438.py: + - Add an Architecture: line to the test Packages file so that apt + doesn't get upset with it. + + -- Colin Watson Thu, 08 Nov 2012 15:02:21 +0000 + python-apt (0.8.8ubuntu2) raring; urgency=low * data/templates/Ubuntu.info.in: diff --git a/tests/test_lp659438.py b/tests/test_lp659438.py index 4564f0f6..da8cfa8e 100644 --- a/tests/test_lp659438.py +++ b/tests/test_lp659438.py @@ -48,7 +48,8 @@ class RegressionTestCase(unittest.TestCase): Status: install reinstreq half-installed Priority: optional Section: admin -Version: 3.6.9+build1+nobinonly-0ubuntu1""") +Version: 3.6.9+build1+nobinonly-0ubuntu1 +Architecture: all""") sources_list_path = apt_pkg.config.find_file("Dir::Etc::sourcelist") repo_path = os.path.abspath("./data/test-repo") with open(sources_list_path, "w") as sources_list: -- cgit v1.2.3 From 021e44e4f49b555a86e7cd75f6ea2a3ae6eb6b66 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Thu, 8 Nov 2012 15:18:59 +0000 Subject: releasing version 0.8.8ubuntu3 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index efcae83b..ec17d70a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,10 @@ -python-apt (0.8.8ubuntu3) UNRELEASED; urgency=low +python-apt (0.8.8ubuntu3) raring; urgency=low * tests/test_lp659438.py: - Add an Architecture: line to the test Packages file so that apt doesn't get upset with it. - -- Colin Watson Thu, 08 Nov 2012 15:02:21 +0000 + -- Colin Watson Thu, 08 Nov 2012 15:03:36 +0000 python-apt (0.8.8ubuntu2) raring; urgency=low -- cgit v1.2.3 From b1c7cc0732f19431e8365e0dc3f812130dca0bdb Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 19 Nov 2012 11:58:29 +0000 Subject: * tests/test_apt_cache.py, tests/test_lp659438.py, tests/test_progress.py: - Clear out APT::Update::Post-Invoke and APT::Update::Post-Invoke-Success in tests that call cache.update to avoid pollution from the host system. --- debian/changelog | 9 +++++++++ tests/test_apt_cache.py | 2 ++ tests/test_lp659438.py | 2 ++ tests/test_progress.py | 2 ++ 4 files changed, 15 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index ec17d70a..e503456f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +python-apt (0.8.8ubuntu4) UNRELEASED; urgency=low + + * tests/test_apt_cache.py, tests/test_lp659438.py, tests/test_progress.py: + - Clear out APT::Update::Post-Invoke and + APT::Update::Post-Invoke-Success in tests that call cache.update to + avoid pollution from the host system. + + -- Colin Watson Mon, 19 Nov 2012 11:57:28 +0000 + python-apt (0.8.8ubuntu3) raring; urgency=low * tests/test_lp659438.py: diff --git a/tests/test_apt_cache.py b/tests/test_apt_cache.py index 7e2ead2d..3cf89c07 100644 --- a/tests/test_apt_cache.py +++ b/tests/test_apt_cache.py @@ -57,6 +57,8 @@ class TestAptCache(TestCase): self._cnf = {} for item in apt_pkg.config.keys(): self._cnf[item] = apt_pkg.config.find(item) + apt_pkg.config.clear("APT::Update::Post-Invoke") + apt_pkg.config.clear("APT::Update::Post-Invoke-Success") def tearDown(self): for item in self._cnf: diff --git a/tests/test_lp659438.py b/tests/test_lp659438.py index da8cfa8e..b9a837b4 100644 --- a/tests/test_lp659438.py +++ b/tests/test_lp659438.py @@ -39,6 +39,8 @@ class RegressionTestCase(unittest.TestCase): def setUp(self): apt_pkg.init_config() + apt_pkg.config.clear("APT::Update::Post-Invoke") + apt_pkg.config.clear("APT::Update::Post-Invoke-Success") self.chroot_path = chroot_path = tempfile.mkdtemp() # Create a damaged status file self.cache = apt.cache.Cache(rootdir=chroot_path) diff --git a/tests/test_progress.py b/tests/test_progress.py index 3b6285d6..b7bba02f 100644 --- a/tests/test_progress.py +++ b/tests/test_progress.py @@ -37,6 +37,8 @@ class TestProgress(unittest.TestCase): with open("fetch_sources.list","w") as fobj: fobj.write(deb_line) apt_pkg.config.set("Dir::Etc::sourcelist", "fetch_sources.list") + apt_pkg.config.clear("APT::Update::Post-Invoke") + apt_pkg.config.clear("APT::Update::Post-Invoke-Success") def test_acquire_progress(self): progress = TestAcquireProgress() -- cgit v1.2.3 From 024b5fda24482226d1ee2eafb297285ebd13e5fa Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 19 Nov 2012 12:37:18 +0000 Subject: * tests/test_auth.py: - Discard stderr from gpg. --- debian/changelog | 2 ++ tests/test_auth.py | 30 ++++++++++++++++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index e503456f..1be049b4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ python-apt (0.8.8ubuntu4) UNRELEASED; urgency=low - Clear out APT::Update::Post-Invoke and APT::Update::Post-Invoke-Success in tests that call cache.update to avoid pollution from the host system. + * tests/test_auth.py: + - Discard stderr from gpg. -- Colin Watson Mon, 19 Nov 2012 11:57:28 +0000 diff --git a/tests/test_auth.py b/tests/test_auth.py index 2b524d28..183752ba 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +import contextlib import os import shutil import sys @@ -152,6 +153,21 @@ class TestAuthKeys(TestCase): for item in cnf: apt_pkg.config.set(item, cnf[item]) + @contextlib.contextmanager + def _discard_stderr(self): + stderr_fd = sys.stderr.fileno() + stderr_save = os.dup(stderr_fd) + try: + devnull = os.open('/dev/null', os.O_WRONLY) + try: + os.dup2(devnull, stderr_fd) + yield + finally: + os.close(devnull) + finally: + os.dup2(stderr_save, stderr_fd) + os.close(stderr_save) + def testAddAndExportKey(self): """Add an example key.""" apt.auth.add_key(WHEEZY_KEY) @@ -202,9 +218,10 @@ class TestAuthKeys(TestCase): self._start_keyserver() self.addCleanup(self._stop_keyserver) with self.assertRaises(apt.auth.AptKeyError) as cm: - apt.auth.add_key_from_keyserver( - "0101010178F7FE5C3E65D8AF8B48AD6246925553", - "hkp://localhost:19191") + with self._discard_stderr(): + apt.auth.add_key_from_keyserver( + "0101010178F7FE5C3E65D8AF8B48AD6246925553", + "hkp://localhost:19191") self.assertTrue( str(cm.exception).startswith("Fingerprints do not match")) @@ -213,9 +230,10 @@ class TestAuthKeys(TestCase): self._start_keyserver() self.addCleanup(self._stop_keyserver) - apt.auth.add_key_from_keyserver( - "0xa1bD8E9D78F7FE5C3E65D8AF8B48AD6246925553", - "hkp://localhost:19191") + with self._discard_stderr(): + apt.auth.add_key_from_keyserver( + "0xa1bD8E9D78F7FE5C3E65D8AF8B48AD6246925553", + "hkp://localhost:19191") ret = apt.auth.list_keys() self.assertEqual(len(ret), 1) -- cgit v1.2.3 From 386f2f98ac0860d3d34c60127232703fb0122001 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 19 Nov 2012 13:00:55 +0000 Subject: Try successive keyserver ports if 19191 is already in use. --- debian/changelog | 1 + tests/test_auth.py | 28 +++++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 1be049b4..39685bef 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ python-apt (0.8.8ubuntu4) UNRELEASED; urgency=low avoid pollution from the host system. * tests/test_auth.py: - Discard stderr from gpg. + - Try successive keyserver ports if 19191 is already in use. -- Colin Watson Mon, 19 Nov 2012 11:57:28 +0000 diff --git a/tests/test_auth.py b/tests/test_auth.py index 183752ba..be7f41a6 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -1,6 +1,10 @@ #!/usr/bin/env python +from __future__ import print_function + import contextlib +import errno +import itertools import os import shutil import sys @@ -221,7 +225,7 @@ class TestAuthKeys(TestCase): with self._discard_stderr(): apt.auth.add_key_from_keyserver( "0101010178F7FE5C3E65D8AF8B48AD6246925553", - "hkp://localhost:19191") + "hkp://localhost:%d" % self.keyserver_port) self.assertTrue( str(cm.exception).startswith("Fingerprints do not match")) @@ -233,7 +237,7 @@ class TestAuthKeys(TestCase): with self._discard_stderr(): apt.auth.add_key_from_keyserver( "0xa1bD8E9D78F7FE5C3E65D8AF8B48AD6246925553", - "hkp://localhost:19191") + "hkp://localhost:%d" % self.keyserver_port) ret = apt.auth.list_keys() self.assertEqual(len(ret), 1) @@ -246,6 +250,8 @@ class TestAuthKeys(TestCase): def _start_keyserver(self): """Start a fake keyserver on http://localhost:19191 + If port 19191 is unavailable, try successive ports until one is. + Store the port actually in use in self.keyserver_port. Thanks pitti. """ dir = tempfile.mkdtemp() @@ -254,15 +260,31 @@ class TestAuthKeys(TestCase): with open(os.path.join(dir, "pks", "lookup"), "w") as key_file: key_file.write(WHEEZY_KEY) + keyserver_pipe = os.pipe() self.keyserver_pid = os.fork() if self.keyserver_pid == 0: + os.close(keyserver_pipe[0]) # quiesce server log os.dup2(os.open('/dev/null', os.O_WRONLY), sys.stderr.fileno()) os.chdir(dir) - httpd = HTTPServer(('localhost', 19191), HTTPRequestHandler) + for port in itertools.count(19191): + try: + httpd = HTTPServer(('localhost', port), HTTPRequestHandler) + break + except IOError as e: + if e.errno != errno.EADDRINUSE: + raise + keyserver_write = os.fdopen(keyserver_pipe[1], 'w') + print(port, file=keyserver_write) + keyserver_write.close() httpd.serve_forever() os._exit(0) + os.close(keyserver_pipe[1]) + keyserver_read = os.fdopen(keyserver_pipe[0]) + self.keyserver_port = int(keyserver_read.readline()) + keyserver_read.close() + # wait a bit until server is ready time.sleep(0.5) -- cgit v1.2.3 From a0ecfe1c745e07c41c85b80d747b19179341531d Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 19 Nov 2012 13:22:42 +0000 Subject: * aptsources/distinfo.py, aptsources/distro.py, aptsources/sourceslist.py, tests/test_apt_cache.py, tests/test_debfile_multiarch.py: - Use logging.warning rather than the deprecated logging.warn. --- aptsources/distinfo.py | 3 ++- aptsources/distro.py | 2 +- aptsources/sourceslist.py | 2 +- debian/changelog | 3 +++ tests/test_apt_cache.py | 8 ++++---- tests/test_debfile_multiarch.py | 4 ++-- 6 files changed, 13 insertions(+), 9 deletions(-) (limited to 'debian') diff --git a/aptsources/distinfo.py b/aptsources/distinfo.py index e0ee915d..d80721e5 100644 --- a/aptsources/distinfo.py +++ b/aptsources/distinfo.py @@ -172,7 +172,8 @@ class DistInfo(object): stdout=PIPE).communicate()[0].strip() except OSError as exc: if exc.errno != errno.ENOENT: - logging.warn('lsb_release failed, using defaults:' % exc) + logging.warning( + 'lsb_release failed, using defaults:' % exc) dist = "Debian" self.dist = dist diff --git a/aptsources/distro.py b/aptsources/distro.py index ca87a919..82fd67ba 100644 --- a/aptsources/distro.py +++ b/aptsources/distro.py @@ -465,7 +465,7 @@ def _lsb_release(): result.update(l.split(":\t") for l in out.split("\n") if ':\t' in l) except OSError as exc: if exc.errno != errno.ENOENT: - logging.warn('lsb_release failed, using defaults:' % exc) + logging.warning('lsb_release failed, using defaults:' % exc) return result diff --git a/aptsources/sourceslist.py b/aptsources/sourceslist.py index 40902d84..f5a86ecb 100644 --- a/aptsources/sourceslist.py +++ b/aptsources/sourceslist.py @@ -375,7 +375,7 @@ class SourcesList(object): source = SourceEntry(line, file) self.list.append(source) except: - logging.warn("could not open file '%s'\n" % file) + logging.warning("could not open file '%s'\n" % file) def save(self): """ save the current sources """ diff --git a/debian/changelog b/debian/changelog index 39685bef..d9083659 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,9 @@ python-apt (0.8.8ubuntu4) UNRELEASED; urgency=low * tests/test_auth.py: - Discard stderr from gpg. - Try successive keyserver ports if 19191 is already in use. + * aptsources/distinfo.py, aptsources/distro.py, aptsources/sourceslist.py, + tests/test_apt_cache.py, tests/test_debfile_multiarch.py: + - Use logging.warning rather than the deprecated logging.warn. -- Colin Watson Mon, 19 Nov 2012 11:57:28 +0000 diff --git a/tests/test_apt_cache.py b/tests/test_apt_cache.py index 3cf89c07..fe90eb8a 100644 --- a/tests/test_apt_cache.py +++ b/tests/test_apt_cache.py @@ -34,7 +34,7 @@ def if_sources_list_is_readable(f): if os.access("/etc/apt/sources.list", os.R_OK): f(*args, **kwargs) else: - logging.warn("skipping '%s' because sources.list is not readable" % f) + logging.warning("skipping '%s' because sources.list is not readable" % f) return wrapper @@ -42,7 +42,7 @@ def get_open_file_descriptors(): try: fds = os.listdir("/proc/self/fd") except OSError: - logging.warn("failed to list /proc/self/fd") + logging.warning("failed to list /proc/self/fd") return set([]) return set(map(int, fds)) @@ -122,7 +122,7 @@ class TestAptCache(TestCase): cache = apt.Cache(rootdir="./data/test-provides/") cache.open() if len(cache) == 0: - logging.warn("skipping test_get_provided_packages, cache empty?!?") + logging.warning("skipping test_get_provided_packages, cache empty?!?") return # a true virtual pkg l = cache.get_providing_packages("mail-transport-agent") @@ -135,7 +135,7 @@ class TestAptCache(TestCase): # create highlevel cache and get the lowlevel one from it highlevel_cache = apt.Cache(rootdir="./data/test-provides") if len(highlevel_cache) == 0: - logging.warn("skipping test_log_level_pkg_provides, cache empty?!?") + logging.warning("skipping test_log_level_pkg_provides, cache empty?!?") return # low level cache provides list of the pkg cache = highlevel_cache._cache diff --git a/tests/test_debfile_multiarch.py b/tests/test_debfile_multiarch.py index 7c02a32a..8da070aa 100644 --- a/tests/test_debfile_multiarch.py +++ b/tests/test_debfile_multiarch.py @@ -23,7 +23,7 @@ class TestDebfileMultiarch(unittest.TestCase): def test_multiarch_deb_check(self): if apt_pkg.get_architectures() != ["amd64", "i386"]: - logging.warn("skipping test because running on a non-multiarch system") + logging.warning("skipping test because running on a non-multiarch system") return deb = apt.debfile.DebPackage( "./data/test_debs/multiarch-test1_i386.deb") @@ -37,7 +37,7 @@ class TestDebfileMultiarch(unittest.TestCase): # use "lib3ds-1-3" as a test to see if non-multiach lib conflicts work canary = "lib3ds-1-3" if not canary in cache: - logging.warn("skipping test because %s is missing" % canary) + logging.warning("skipping test because %s is missing" % canary) return cache[canary].mark_install() deb = apt.debfile.DebPackage( -- cgit v1.2.3 From 116aa6eec9cf830d81c45ff257f16d7472e5314b Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 19 Nov 2012 13:25:49 +0000 Subject: * tests/test_debfile_multiarch.py: - Don't log warnings when skipping tests; the resulting stderr output causes autopkgtest to fail. --- debian/changelog | 3 +++ tests/test_debfile_multiarch.py | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index d9083659..25125971 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,9 @@ python-apt (0.8.8ubuntu4) UNRELEASED; urgency=low * aptsources/distinfo.py, aptsources/distro.py, aptsources/sourceslist.py, tests/test_apt_cache.py, tests/test_debfile_multiarch.py: - Use logging.warning rather than the deprecated logging.warn. + * tests/test_debfile_multiarch.py: + - Don't log warnings when skipping tests; the resulting stderr output + causes autopkgtest to fail. -- Colin Watson Mon, 19 Nov 2012 11:57:28 +0000 diff --git a/tests/test_debfile_multiarch.py b/tests/test_debfile_multiarch.py index 8da070aa..5e6d0b9a 100644 --- a/tests/test_debfile_multiarch.py +++ b/tests/test_debfile_multiarch.py @@ -23,7 +23,8 @@ class TestDebfileMultiarch(unittest.TestCase): def test_multiarch_deb_check(self): if apt_pkg.get_architectures() != ["amd64", "i386"]: - logging.warning("skipping test because running on a non-multiarch system") + # TODO: use unittest.skip + #logging.warning("skipping test because running on a non-multiarch system") return deb = apt.debfile.DebPackage( "./data/test_debs/multiarch-test1_i386.deb") @@ -37,7 +38,8 @@ class TestDebfileMultiarch(unittest.TestCase): # use "lib3ds-1-3" as a test to see if non-multiach lib conflicts work canary = "lib3ds-1-3" if not canary in cache: - logging.warning("skipping test because %s is missing" % canary) + # TODO: use unittest.skip + #logging.warning("skipping test because %s is missing" % canary) return cache[canary].mark_install() deb = apt.debfile.DebPackage( -- cgit v1.2.3 From b8ea5404dd387aa9f414a44113610d395777b778 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 19 Nov 2012 14:15:23 +0000 Subject: * tests/test_all.py: - Write general test status output to stdout, not stderr. --- debian/changelog | 2 ++ tests/test_all.py | 13 +++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 25125971..2fbfc3b4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,8 @@ python-apt (0.8.8ubuntu4) UNRELEASED; urgency=low * tests/test_debfile_multiarch.py: - Don't log warnings when skipping tests; the resulting stderr output causes autopkgtest to fail. + * tests/test_all.py: + - Write general test status output to stdout, not stderr. -- Colin Watson Mon, 19 Nov 2012 11:57:28 +0000 diff --git a/tests/test_all.py b/tests/test_all.py index 0f548781..0eccfa91 100644 --- a/tests/test_all.py +++ b/tests/test_all.py @@ -33,17 +33,22 @@ def get_library_dir(): plat_specifier) return os.path.abspath(library_dir) +class MyTestRunner(unittest.runner.TextTestRunner): + def __init__(self, *args, **kwargs): + kwargs["stream"] = sys.stdout + super(MyTestRunner, self).__init__(*args, **kwargs) + if __name__ == '__main__': if not os.access("/etc/apt/sources.list", os.R_OK): - sys.stderr.write("[tests] Skipping because sources.list is not readable\n") + sys.stdout.write("[tests] Skipping because sources.list is not readable\n") sys.exit(0) - sys.stderr.write("[tests] Running on %s\n" % sys.version.replace("\n", "")) + sys.stdout.write("[tests] Running on %s\n" % sys.version.replace("\n", "")) dirname = os.path.dirname(__file__) if dirname: os.chdir(dirname) library_dir = get_library_dir() - sys.stderr.write("Using library_dir: '%s'" % library_dir) + sys.stdout.write("Using library_dir: '%s'" % library_dir) if library_dir: sys.path.insert(0, os.path.abspath(library_dir)) @@ -51,4 +56,4 @@ if __name__ == '__main__': if path.endswith('.py') and os.path.isfile(path): exec('from %s import *' % path[:-3]) - unittest.main() + unittest.main(testRunner=MyTestRunner) -- cgit v1.2.3 From 178bf6c4cbde8a3f66a1b8f018d7a950125eee84 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 19 Nov 2012 14:16:39 +0000 Subject: * tests/test_aptsources.py: - Clean up file object in test_enable_component. --- debian/changelog | 2 ++ tests/test_aptsources.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 2fbfc3b4..02e99916 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,8 @@ python-apt (0.8.8ubuntu4) UNRELEASED; urgency=low causes autopkgtest to fail. * tests/test_all.py: - Write general test status output to stdout, not stderr. + * tests/test_aptsources.py: + - Clean up file object in test_enable_component. -- Colin Watson Mon, 19 Nov 2012 11:57:28 +0000 diff --git a/tests/test_aptsources.py b/tests/test_aptsources.py index 41cfabb3..75dd91c1 100644 --- a/tests/test_aptsources.py +++ b/tests/test_aptsources.py @@ -164,7 +164,8 @@ class TestAptSources(unittest.TestCase): from subprocess import Popen, PIPE target = "./data/aptsources/sources.list.enable_comps" line = "deb http://archive.ubuntu.com/ubuntu lucid main\n" - open(target, "w").write(line) + with open(target, "w") as target_file: + target_file.write(line) apt_pkg.config.set("Dir::Etc::sourcelist", target) sources = aptsources.sourceslist.SourcesList(True, self.templates) distro = aptsources.distro.get_distro(id="Ubuntu") -- cgit v1.2.3 From 62364cec6ad24aa75590bbefd7ce3ecf13ff2088 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 19 Nov 2012 14:46:20 +0000 Subject: releasing version 0.8.8ubuntu4 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 02e99916..4a7a0485 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -python-apt (0.8.8ubuntu4) UNRELEASED; urgency=low +python-apt (0.8.8ubuntu4) raring; urgency=low * tests/test_apt_cache.py, tests/test_lp659438.py, tests/test_progress.py: - Clear out APT::Update::Post-Invoke and @@ -18,7 +18,7 @@ python-apt (0.8.8ubuntu4) UNRELEASED; urgency=low * tests/test_aptsources.py: - Clean up file object in test_enable_component. - -- Colin Watson Mon, 19 Nov 2012 11:57:28 +0000 + -- Colin Watson Mon, 19 Nov 2012 14:17:02 +0000 python-apt (0.8.8ubuntu3) raring; urgency=low -- cgit v1.2.3 From 7fd512f22177d4745843d8d282cbb8a964915a21 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 20 Nov 2012 09:44:23 +0100 Subject: tests/*.py: Do not prepend None to sys.path, Python 3.3 redeems that with an unintelligible crash. --- debian/changelog | 7 +++++++ tests/test_apt_cache.py | 4 +++- tests/test_debfile.py | 4 +++- tests/test_debfile_multiarch.py | 4 +++- tests/test_tagfile.py | 4 +++- 5 files changed, 19 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 4a7a0485..6bfacedf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +python-apt (0.8.8ubuntu5) UNRELEASED; urgency=low + + * tests/*.py: Do not prepend None to sys.path, Python 3.3 redeems that with + an unintelligible crash. + + -- Martin Pitt Tue, 20 Nov 2012 09:43:36 +0100 + python-apt (0.8.8ubuntu4) raring; urgency=low * tests/test_apt_cache.py, tests/test_lp659438.py, tests/test_progress.py: diff --git a/tests/test_apt_cache.py b/tests/test_apt_cache.py index fe90eb8a..21dfeb98 100644 --- a/tests/test_apt_cache.py +++ b/tests/test_apt_cache.py @@ -23,7 +23,9 @@ else: from test_all import get_library_dir -sys.path.insert(0, get_library_dir()) +libdir = get_library_dir() +if libdir: + sys.path.insert(0, libdir) import apt import apt_pkg diff --git a/tests/test_debfile.py b/tests/test_debfile.py index 04a6b65a..75c46966 100644 --- a/tests/test_debfile.py +++ b/tests/test_debfile.py @@ -13,7 +13,9 @@ import unittest from test_all import get_library_dir import sys -sys.path.insert(0, get_library_dir()) +libdir = get_library_dir() +if libdir: + sys.path.insert(0, libdir) import apt_pkg import apt.debfile diff --git a/tests/test_debfile_multiarch.py b/tests/test_debfile_multiarch.py index 5e6d0b9a..bbf62016 100644 --- a/tests/test_debfile_multiarch.py +++ b/tests/test_debfile_multiarch.py @@ -13,7 +13,9 @@ import unittest from test_all import get_library_dir import sys -sys.path.insert(0, get_library_dir()) +libdir = get_library_dir() +if libdir: + sys.path.insert(0, libdir) import apt import apt_pkg import apt.debfile diff --git a/tests/test_tagfile.py b/tests/test_tagfile.py index 33197e6a..f26f851b 100644 --- a/tests/test_tagfile.py +++ b/tests/test_tagfile.py @@ -21,7 +21,9 @@ import tempfile import unittest from test_all import get_library_dir -sys.path.insert(0, get_library_dir()) +libdir = get_library_dir() +if libdir: + sys.path.insert(0, libdir) import apt_pkg -- cgit v1.2.3 From 5b224ace5811c2cc9a1f5506072f04abbd7dc242 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 20 Nov 2012 09:52:18 +0100 Subject: tests/test_auth.py: In test_add_key_from_server_mitm(), show the exception if it does not match the expectation, so that this becomes possible to debug. --- debian/changelog | 3 +++ tests/test_auth.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 6bfacedf..cce0d623 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ python-apt (0.8.8ubuntu5) UNRELEASED; urgency=low * tests/*.py: Do not prepend None to sys.path, Python 3.3 redeems that with an unintelligible crash. + * tests/test_auth.py: In test_add_key_from_server_mitm(), show the exception + if it does not match the expectation, so that this becomes possible to + debug. -- Martin Pitt Tue, 20 Nov 2012 09:43:36 +0100 diff --git a/tests/test_auth.py b/tests/test_auth.py index be7f41a6..7fb8160b 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -227,7 +227,7 @@ class TestAuthKeys(TestCase): "0101010178F7FE5C3E65D8AF8B48AD6246925553", "hkp://localhost:%d" % self.keyserver_port) self.assertTrue( - str(cm.exception).startswith("Fingerprints do not match")) + str(cm.exception).startswith("Fingerprints do not match"), cm.exception) def testAddKeyFromServer(self): """Install a GnuPG key from a remote server.""" -- cgit v1.2.3 From 7898eab688249a2200156c5be039d91ba58a8b39 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 20 Nov 2012 10:52:06 +0100 Subject: aptsources/distro.py: Replace the deprecated getiterator() ElementTree method with iter(), to avoid raising a PendingDeprecationWarning. --- aptsources/distro.py | 2 +- debian/changelog | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/aptsources/distro.py b/aptsources/distro.py index 82fd67ba..1c9daa27 100644 --- a/aptsources/distro.py +++ b/aptsources/distro.py @@ -163,7 +163,7 @@ class Distribution(object): fname = "/usr/share/xml/iso-codes/iso_3166.xml" if os.path.exists(fname): et = ElementTree(file=fname) - it = et.getiterator('iso_3166_entry') + it = et.iter('iso_3166_entry') for elm in it: try: descr = elm.attrib["common_name"] diff --git a/debian/changelog b/debian/changelog index cce0d623..cad5c31c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ python-apt (0.8.8ubuntu5) UNRELEASED; urgency=low * tests/test_auth.py: In test_add_key_from_server_mitm(), show the exception if it does not match the expectation, so that this becomes possible to debug. + * aptsources/distro.py: Replace the deprecated getiterator() ElementTree + method with iter(), to avoid raising a PendingDeprecationWarning. -- Martin Pitt Tue, 20 Nov 2012 09:43:36 +0100 -- cgit v1.2.3 From d07479422c5930856ebb5ff362e176bd5c64441a Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 20 Nov 2012 11:41:48 +0100 Subject: tests/test_auth.py: Temporarily disable $http_proxy for the tests, as gnupg does not get along with proxies (LP #789049) --- debian/changelog | 2 ++ tests/test_auth.py | 11 +++++++++++ 2 files changed, 13 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index cad5c31c..e934f203 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,8 @@ python-apt (0.8.8ubuntu5) UNRELEASED; urgency=low debug. * aptsources/distro.py: Replace the deprecated getiterator() ElementTree method with iter(), to avoid raising a PendingDeprecationWarning. + * tests/test_auth.py: Temporarily disable $http_proxy for the tests, as + gnupg does not get along with proxies (LP #789049) -- Martin Pitt Tue, 20 Nov 2012 09:43:36 +0100 diff --git a/tests/test_auth.py b/tests/test_auth.py index 7fb8160b..bc353427 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -285,6 +285,14 @@ class TestAuthKeys(TestCase): self.keyserver_port = int(keyserver_read.readline()) keyserver_read.close() + # temporarily disable proxy, as gnupg does not get along with that + # (LP #789049) + self.orig_proxy = os.environ.get('http_proxy') + try: + del os.environ['http_proxy'] + except KeyError: + pass + # wait a bit until server is ready time.sleep(0.5) @@ -295,6 +303,9 @@ class TestAuthKeys(TestCase): os.kill(self.keyserver_pid, 15) os.wait() + # restore proxy + if self.orig_proxy is not None: + os.environ['http_proxy'] = self.orig_proxy if __name__ == "__main__": unittest.main() -- cgit v1.2.3 From c7eb97c2fc8e2f4d3a7e41ac615382657eb95d49 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 20 Nov 2012 12:01:11 +0100 Subject: releasing version 0.8.8ubuntu5 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index e934f203..1e93f222 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -python-apt (0.8.8ubuntu5) UNRELEASED; urgency=low +python-apt (0.8.8ubuntu5) raring; urgency=low * tests/*.py: Do not prepend None to sys.path, Python 3.3 redeems that with an unintelligible crash. @@ -10,7 +10,7 @@ python-apt (0.8.8ubuntu5) UNRELEASED; urgency=low * tests/test_auth.py: Temporarily disable $http_proxy for the tests, as gnupg does not get along with proxies (LP #789049) - -- Martin Pitt Tue, 20 Nov 2012 09:43:36 +0100 + -- Martin Pitt Tue, 20 Nov 2012 12:01:08 +0100 python-apt (0.8.8ubuntu4) raring; urgency=low -- cgit v1.2.3 From ecd633e68d664776f9454bbbed9c1ee61dd62b05 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 13 Mar 2013 19:21:05 +0100 Subject: releasing version 0.8.9~exp1 --- debian/changelog | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index a7292ef3..c910a2ab 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -python-apt (0.8.9~exp1) UNRELEASED; urgency=low +python-apt (0.8.9~exp1) experimental; urgency=low [ Michael Vogt ] * python/tag.cc: @@ -10,6 +10,8 @@ python-apt (0.8.9~exp1) UNRELEASED; urgency=low * build fixes for python3.3 * data/templates/Ubuntu.info.in: - add raring + * tests/test_all.py, aptsources/distro.py: + - python2.6 compat fixes [ Jason Conti ] * lp:~jconti/python-apt/closeable-cache: @@ -50,7 +52,7 @@ python-apt (0.8.9~exp1) UNRELEASED; urgency=low * data/templates/Ubuntu.info.in: - Fix descriptions of quantal and raring. - -- Michael Vogt Mon, 15 Oct 2012 10:03:21 +0200 + -- Michael Vogt Wed, 13 Mar 2013 18:36:37 +0100 python-apt (0.8.8.2) UNRELEASED; urgency=low -- cgit v1.2.3 From a2d20deb3639b0d6eed6b4520c3c7fec8bbd3126 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 19 Mar 2013 16:51:32 +0100 Subject: * apt/package.py: - export codename in apt.package.Origin as well (closes: #703401) --- apt/package.py | 2 ++ debian/changelog | 8 ++++++++ 2 files changed, 10 insertions(+) (limited to 'debian') diff --git a/apt/package.py b/apt/package.py index 29eec909..3d091ae2 100644 --- a/apt/package.py +++ b/apt/package.py @@ -137,6 +137,7 @@ class Origin(object): component - The component (eg. main) label - The Label, as set in the Release file origin - The Origin, as set in the Release file + codename - The Codename, as set in the Release file site - The hostname of the site. trusted - Boolean value whether this is trustworthy. """ @@ -146,6 +147,7 @@ class Origin(object): self.component = packagefile.component self.label = packagefile.label self.origin = packagefile.origin + self.codename = packagefile.codename self.site = packagefile.site self.not_automatic = packagefile.not_automatic # check the trust diff --git a/debian/changelog b/debian/changelog index c910a2ab..3d50070a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +python-apt (0.8.9~exp2) UNRELEASEDexperimental; urgency=low + + * apt/package.py: + - export codename in apt.package.Origin as well + (closes: #703401) + + -- Michael Vogt Tue, 19 Mar 2013 16:50:55 +0100 + python-apt (0.8.9~exp1) experimental; urgency=low [ Michael Vogt ] -- cgit v1.2.3 From b805a16a7466a99bf0952b0ccc0dc7c5b3c6f797 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 19 Mar 2013 17:04:59 +0100 Subject: releasing version 0.8.9~exp2 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 3d50070a..7cfa4a69 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,10 @@ -python-apt (0.8.9~exp2) UNRELEASEDexperimental; urgency=low +python-apt (0.8.9~exp2) experimental; urgency=low * apt/package.py: - export codename in apt.package.Origin as well (closes: #703401) - -- Michael Vogt Tue, 19 Mar 2013 16:50:55 +0100 + -- Michael Vogt Tue, 19 Mar 2013 16:57:40 +0100 python-apt (0.8.9~exp1) experimental; urgency=low -- cgit v1.2.3