From b5f8abcd50577205129176bd2430f3af28aa3feb Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@cd1c1023-2f26-0410-ae45-c471fc1f0318> Date: Wed, 13 Feb 2008 14:41:08 +0000 Subject: [PATCH] improved deptest output information git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1201 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- client/text_ui.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/client/text_ui.py b/client/text_ui.py index ef8a80feb..2bdb0b609 100644 --- a/client/text_ui.py +++ b/client/text_ui.py @@ -822,9 +822,26 @@ def dependenciesTest(): depsNotMatched = Equo.dependencies_test() if depsNotMatched: + + crying_atoms = {} + for atom in depsNotMatched: + riddep = Equo.clientDbconn.searchDependency(atom) + if riddep != -1: + ridpackages = Equo.clientDbconn.searchIdpackageFromIddependency(riddep) + for i in ridpackages: + iatom = Equo.clientDbconn.retrieveAtom(i) + if not crying_atoms.has_key(atom): + crying_atoms[atom] = set() + crying_atoms[atom].add(iatom) + print_info(red(" @@ ")+blue("These are the dependencies not found:")) - for dep in depsNotMatched: - print_info(" # "+red(dep)) + for atom in depsNotMatched: + print_info(" # "+red(atom)) + if crying_atoms.has_key(atom): + print_info(blue(" # ")+red("Needed by:")) + for x in crying_atoms[atom]: + print_info(blue(" # ")+darkgreen(x)) + if (etpUi['ask']): rc = Equo.askQuestion(" Would you like to install the available packages?") if rc == "No":