diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2012-08-14 15:00:18 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2012-08-14 15:00:18 +0200 |
| commit | 5384546c17c80b809791ef95ac357bc017be83f9 (patch) | |
| tree | ea3d96b59d2e5551ea1724e29743e209ad930a3c | |
| parent | 626172bce42c66671c4db8e76f005c678baf462a (diff) | |
| parent | cef90610bf1bd56da9f94ed4f848b08e0203f532 (diff) | |
| download | python-apt-5384546c17c80b809791ef95ac357bc017be83f9.tar.gz | |
merged from the lp:~mvo/python-apt/mvo tree
| -rw-r--r-- | debian/changelog | 4 | ||||
| -rw-r--r-- | python/cache.cc | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 0d0fd019..9cfaacf0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,10 @@ python-apt (0.8.8) UNRELEASED; urgency=low [ Program translation updates ] * po/pl.po: Polish (Michał Kułach) (closes: #684308) + [ Michael Vogt ] + * python/cache.cc: + - add "Codename" to PackageFile object + -- David Prévot <taffit@debian.org> Wed, 08 Aug 2012 12:05:52 -0400 python-apt (0.8.7) unstable; urgency=low 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, |
