summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-10-12 11:02:57 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-10-12 11:02:57 +0200
commit78e9e09c400d9ea185da11328a00ef9251c0b342 (patch)
treeadab3d6038502cdd97557805d22a54080143e070
parentfbc1eb3e01df0dad1779ff723018936b4a0a5921 (diff)
parent43d87e1b14719750585412ab1d15fc30e280b7d0 (diff)
downloadpython-apt-78e9e09c400d9ea185da11328a00ef9251c0b342.tar.gz
* add dep8 style autopkgtest support
* add "codename" to the PackageFile object * python/cache.cc: - Use Popen.communicate() instead of stdin, stdout
-rw-r--r--debian/changelog11
-rw-r--r--debian/control1
-rw-r--r--debian/tests/control2
-rw-r--r--debian/tests/run-tests8
-rw-r--r--python/cache.cc8
5 files changed, 28 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 62450591..203c968d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+python-apt (0.8.7ubuntu5) UNRELEASED; urgency=low
+
+ * add dep8 style autopkgtest support
+ * add "codename" to the PackageFile object
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 12 Oct 2012 11:02:03 +0200
+
python-apt (0.8.7ubuntu4) quantal; urgency=low
* apt/auth.py:
@@ -90,13 +97,13 @@ 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:
[ 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.
-
+ - Use Popen.communicate() instead of stdin, stdout
[ Julian Andres Klode ]
* apt/auth.py:
- Use tempfile.NamedTemporaryFile to create temporary file
diff --git a/debian/control b/debian/control
index 5707b0c2..c186dc23 100644
--- a/debian/control
+++ b/debian/control
@@ -22,6 +22,7 @@ Build-Depends: apt (>= 0.9.6),
Vcs-Bzr: http://code.launchpad.net/~ubuntu-core-dev/python-apt/ubuntu
XS-Debian-Vcs-Bzr: http://bzr.debian.org/apt/python-apt/debian-sid
XS-Debian-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..2ca0a401
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: run-tests
+Depends: @, apt-utils, python-debian, fakeroot, intltool
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
diff --git a/python/cache.cc b/python/cache.cc
index 10561ca0..e527faba 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<pkgCache::PkgFileIterator>(Self);
+ return Safe_FromString(File.Codename());
+}
+
static PyObject *PackageFile_GetSite(PyObject *Self,void*)
{
pkgCache::PkgFileIterator &File = GetCpp<pkgCache::PkgFileIterator>(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,