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 --- apt/cache.py | 2 +- debian/changelog | 4 +++- python/cache.cc | 12 +++++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/apt/cache.py b/apt/cache.py index 2821f287..fbca0f2a 100644 --- a/apt/cache.py +++ b/apt/cache.py @@ -203,7 +203,7 @@ class Cache(object): if res == pm.ResultCompleted: break if res == pm.ResultFailed: - raise SystemError, "install failed" + raise SystemError, "installArchives() failed" # reload the fetcher for media swaping fetcher.Shutdown() return (res == pm.ResultCompleted) diff --git a/debian/changelog b/debian/changelog index 3b84dd1e..80634e36 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,10 @@ python-apt (0.6.16.1) unstable; urgency=low * memleak fixed when pkgCache objects are deallocated * typos fixed (thanks to Gustavo Franco) * pkgRecords.Record added to get raw record data + * python/cache.cc: "key" in pkgCache::VerIterator.DependsList[key] is + no longer locale specific but always english - -- + -- Michael Vogt Thu, 26 Jan 2006 16:30:02 +0100 python-apt (0.6.16) unstable; urgency=low 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