From 66c0bbbd4f5a0e98a9df138e84b41b317c946cda Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 15 Nov 2008 18:09:04 +0000 Subject: Make depgraph.display_problems() send unsatisfied dependency ouput to stdout, for parsing by programs such as autounmask. svn path=/main/trunk/; revision=11949 --- pym/_emerge/__init__.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'pym') diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index f09396277..9c90e736c 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -7578,7 +7578,8 @@ class depgraph(object): is not going to be called then this method should be called explicitly to ensure that the user is notified of problems with the graph. - All output goes to stderr. + All output goes to stderr, except for unsatisfied dependencies which + go to stdout for parsing by programs such as autounmask. """ # Note that show_masked_packages() sends it's output to @@ -7600,6 +7601,10 @@ class depgraph(object): sys.stdout.flush() sys.stderr.flush() + # This goes to stdout for parsing by programs like autounmask. + for pargs, kwargs in self._unsatisfied_deps_for_display: + self._show_unsatisfied_dep(*pargs, **kwargs) + def _display_problems(self): if self._circular_deps_for_display is not None: self._show_circular_deps( @@ -7695,9 +7700,6 @@ class depgraph(object): show_mask_docs() print - for pargs, kwargs in self._unsatisfied_deps_for_display: - self._show_unsatisfied_dep(*pargs, **kwargs) - def calc_changelog(self,ebuildpath,current,next): if ebuildpath == None or not os.path.exists(ebuildpath): return [] -- cgit v1.2.3-1-g7c22