From b51b6bf42e6ccd487f902fe31685defa0bc6aedd Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 26 Jan 2006 15:40:59 +0000 Subject: * the pkgCache::VerIterator.DependsList[] dict does no longer depend on the localized depends name but on the english one --- python/cache.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'python/cache.cc') 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) -- cgit v1.2.3