From a3e36e2888caff445dc90b6a6cfa2e87b9a471bd Mon Sep 17 00:00:00 2001 From: lxnay Date: Tue, 31 Jul 2007 22:02:01 +0000 Subject: [PATCH] this should work git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@361 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- client/equoTools.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/client/equoTools.py b/client/equoTools.py index 5dcde3581..a6c94180e 100644 --- a/client/equoTools.py +++ b/client/equoTools.py @@ -798,7 +798,22 @@ def getDependencies(packageInfo): # find the best versions = [] for x in deps: - # FIXME: find the one in the database and add it back + if x.find("|and|"): + anddeps = x.split("|and|") + outanddeps = anddeps[:] + for y in anddeps: + ykey = dep_getkey(y) + ycat = ykey.split("/")[0] + yname = ykey.split("/")[1] + yresult = dbconn.searchPackagesByNameAndCategory(yname,ycat) + if (yresult): + outanddeps.remove(y) + if (not outanddeps): + # all dependencies are found and ok + for y in anddeps: + _depend.append(y) + break + key = dep_getkey(deps[0]) cat = key.split("/")[0] name = key.split("/")[1]