Always show PORTDIR with index 0 in the repo display.
authorZac Medico <zmedico@gentoo.org>
Sat, 14 Jul 2007 22:44:08 +0000 (22:44 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 14 Jul 2007 22:44:08 +0000 (22:44 -0000)
svn path=/main/trunk/; revision=7257

pym/emerge/__init__.py

index d4358604b9f4e57e9f337cdbed39c444381cc90c..689bfb13b4091fd17465918fa93538a993e5850f 100644 (file)
@@ -2683,6 +2683,13 @@ class depgraph(object):
                        return s
                repo_str.unknown_repo = False
 
+               # pre-allocate index for PORTDIR so that it always has index 0.
+               for root_config in self.roots.itervalues():
+                       portdb = root_config.trees["porttree"].dbapi
+                       portdir = portdb.porttree_root
+                       if portdir:
+                               repo_str(portdb, portdir)
+
                tree_nodes = []
                display_list = []
                mygraph = self._parent_child_digraph