summaryrefslogtreecommitdiff
path: root/python/cache.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-01-26 15:40:59 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2006-01-26 15:40:59 +0000
commitb51b6bf42e6ccd487f902fe31685defa0bc6aedd (patch)
tree2e4dca3551ff80ca3bcdf7c08b57bf0649b6e9ed /python/cache.cc
parent940c6ecb9e7494414c4554fa4487cb5d17b5dadb (diff)
downloadpython-apt-b51b6bf42e6ccd487f902fe31685defa0bc6aedd.tar.gz
* the pkgCache::VerIterator.DependsList[] dict does no longer depend on the localized depends name but on the english one
Diffstat (limited to 'python/cache.cc')
-rw-r--r--python/cache.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/python/cache.cc b/python/cache.cc
index b35a3ade..174423c2 100644
--- a/python/cache.cc
+++ b/python/cache.cc
@@ -463,7 +463,17 @@ static PyObject *MakeDepends(PyObject *Owner,pkgCache::VerIterator &Ver,
// Switch/create a new dict entry
if (LastDepType != Start->Type || LastDep != 0)
{
- PyObject *Dep = PyString_FromString(Start.DepType());
+ // must be in sync with pkgCache::DepType in libapt
+ // it sucks to have it here duplicated, but we get it
+ // translated from libapt and that is certainly not what
+ // we want in a programing interface
+ const char *Types[] =
+ {
+ "", "Depends","PreDepends","Suggests",
+ "Recommends","Conflicts","Replaces",
+ "Obsoletes"
+ };
+ PyObject *Dep = PyString_FromString(Types[Start->Type]);
LastDepType = Start->Type;
LastDep = PyDict_GetItem(Dict,Dep);
if (LastDep == 0)