Make depgraph.display_problems() send unsatisfied dependency ouput to stdout,
authorZac Medico <zmedico@gentoo.org>
Sat, 15 Nov 2008 18:09:04 +0000 (18:09 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 15 Nov 2008 18:09:04 +0000 (18:09 -0000)
for parsing by programs such as autounmask.

svn path=/main/trunk/; revision=11949

pym/_emerge/__init__.py

index f093962778fddb2cfe848bd020bd41469c8bd439..9c90e736c23734a79c40222afa62f9f69c708833 100644 (file)
@@ -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 []