Fix some unwanted interaction between --tree display and unsatisfied
authorZac Medico <zmedico@gentoo.org>
Sun, 4 May 2008 03:27:10 +0000 (03:27 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 4 May 2008 03:27:10 +0000 (03:27 -0000)
blockers in depgraph.display(). (trunk r10155)

svn path=/main/branches/2.1.2/; revision=10156

bin/emerge

index e5d7db304c6d26e129d5465958793cfab89e0393..65a5821020b4801c2c8badd11bd12ce9b9cdb8e2 100755 (executable)
@@ -4194,10 +4194,17 @@ class depgraph(object):
                                        if parent != inst_pkg:
                                                mygraph.add(blocker, parent)
 
+               tree = "--tree" in self.myopts
+               
+
+               unsatisfied_blockers = []
                i = 0
                depth = 0
                shown_edges = set()
                for x in mylist:
+                       if isinstance(x, Blocker) and not x.satisfied:
+                               unsatisfied_blockers.append(x)
+                               continue
                        graph_key = x
                        if "--tree" in self.myopts:
                                depth = len(tree_nodes)
@@ -4256,6 +4263,8 @@ class depgraph(object):
                        else:
                                display_list.append((x, depth, True))
                mylist = display_list
+               for x in unsatisfied_blockers:
+                       mylist.append((x, 0, True))
 
                last_merge_depth = 0
                for i in xrange(len(mylist)-1,-1,-1):