From 20f99522ed450be5c5d6b2e65395283ad389d6db Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 27 May 2008 00:10:12 +0000 Subject: [PATCH] Add some debug output for arguments and their associated atoms, to help in debugging problems similar to bug #223735. svn path=/main/trunk/; revision=10436 --- pym/_emerge/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index b045b02f1..9ec78c053 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -2471,6 +2471,7 @@ class depgraph(object): def select_files(self, myfiles): """Given a list of .tbz2s, .ebuilds sets, and deps, create the appropriate depgraph and return a favorite list.""" + debug = "--debug" in self.myopts root_config = self.roots[self.target_root] sets = root_config.sets getSetAtoms = root_config.setconfig.getSetAtoms @@ -2697,6 +2698,8 @@ class depgraph(object): if arg not in refs: refs.append(arg) pprovideddict = pkgsettings.pprovideddict + if debug: + portage.writemsg("\n", noiselevel=-1) # Order needs to be preserved since a feature of --nodeps # is to allow the user to force a specific merge order. args.reverse() @@ -2718,6 +2721,9 @@ class depgraph(object): "dependencies for %s\n") % arg.arg) return 0, myfavorites continue + if debug: + portage.writemsg(" Arg: %s\n Atom: %s\n" % \ + (arg, atom), noiselevel=-1) pkg, existing_node = self._select_package( myroot, atom, onlydeps=onlydeps) if not pkg: @@ -3215,7 +3221,8 @@ class depgraph(object): if "--debug" in self.myopts: for pkg in matched_packages: - print (pkg.type_name + ":").rjust(10), pkg.cpv + portage.writemsg("%s %s\n" % \ + ((pkg.type_name + ":").rjust(10), pkg.cpv), noiselevel=-1) # Filter out any old-style virtual matches if they are # mixed with new-style virtual matches. -- 2.26.2