summaryrefslogtreecommitdiff
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
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
-rw-r--r--apt/cache.py2
-rw-r--r--debian/changelog4
-rw-r--r--python/cache.cc12
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 <michael.vogt@ubuntu.com> 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)