summaryrefslogtreecommitdiff
path: root/python/cache.cc
diff options
context:
space:
mode:
authorMichael Vogt <egon@debian-devbox>2013-05-08 19:09:21 +0200
committerMichael Vogt <egon@debian-devbox>2013-05-08 19:09:21 +0200
commite2e4d3dd3dc2a41469f5d559cbdb5ca6c5057f01 (patch)
tree6c3655648f24418b207422ff3125632bebf53962 /python/cache.cc
parent7cf77010c108df676d3e277716f790b994bba28e (diff)
parentb805a16a7466a99bf0952b0ccc0dc7c5b3c6f797 (diff)
downloadpython-apt-e2e4d3dd3dc2a41469f5d559cbdb5ca6c5057f01.tar.gz
merged from experimental and uploaded to sid
Diffstat (limited to 'python/cache.cc')
-rw-r--r--python/cache.cc8
1 files changed, 8 insertions, 0 deletions
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,