summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-08-14 14:08:22 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-08-14 14:08:22 +0200
commitcef90610bf1bd56da9f94ed4f848b08e0203f532 (patch)
tree2efd60e61c82b6217fab0b02517de71ab3f9933d
parent794e9321c92aab78c3b7123d765967ba67b79851 (diff)
downloadpython-apt-cef90610bf1bd56da9f94ed4f848b08e0203f532.tar.gz
* python/cache.cc:
- add "Codename" to PackageFile object
-rw-r--r--debian/changelog2
-rw-r--r--python/cache.cc8
2 files changed, 10 insertions, 0 deletions
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<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,