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(+) 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 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 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(-) 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