aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Stubbs <jstubbs@gentoo.org>2004-11-06 16:40:38 +0000
committerJason Stubbs <jstubbs@gentoo.org>2004-11-06 16:40:38 +0000
commitd3206f0f32a3aa4e9a2010a0aa03d9ba35a5ef77 (patch)
treeafa69ba1a8faff0d676b1d776df0a93e46d6e5f4 /bin/emerge
parentAdded a reimplementation of digraph. Still some work to do (including (diff)
downloadportage-cvs-d3206f0f32a3aa4e9a2010a0aa03d9ba35a5ef77.tar.gz
portage-cvs-d3206f0f32a3aa4e9a2010a0aa03d9ba35a5ef77.tar.bz2
portage-cvs-d3206f0f32a3aa4e9a2010a0aa03d9ba35a5ef77.zip
Added full code comments to the DependencyGraph class. Did some code
optimization where readability was not adversly affected. Removed the testing output from emerge.
Diffstat (limited to 'bin/emerge')
-rwxr-xr-xbin/emerge18
1 files changed, 3 insertions, 15 deletions
diff --git a/bin/emerge b/bin/emerge
index 62f7a58..3db4cd1 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -1,7 +1,7 @@
#!/usr/bin/python -O
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/emerge,v 1.354 2004/11/06 02:34:24 jstubbs Exp $
+# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/emerge,v 1.355 2004/11/06 16:40:38 jstubbs Exp $
import os,sys
os.environ["PORTAGE_CALLER"]="emerge"
@@ -880,7 +880,7 @@ class depgraph:
child = jbigkey+" merge"
else:
child = jbigkey+" nomerge"
- self.mynewgraph.add_relation(myparent, child, 1)
+ self.mynewgraph.add_relationship(myparent, child)
#this conditional is needed to prevent infinite recursion on already-processed deps
return 1
@@ -947,7 +947,7 @@ class depgraph:
self.digraph.addnode(string.join(mybigkey),myparent)
self.mynewgraph.add_node(string.join(mybigkey))
if myparent:
- self.mynewgraph.add_relation(myparent, string.join(mybigkey), 1)
+ self.mynewgraph.add_relationship(myparent, string.join(mybigkey))
if ("deep" not in myparams) and (not merging):
return 1
elif "recurse" not in myparams:
@@ -2979,18 +2979,6 @@ else:
myopts.remove("--ask")
if ("--pretend" in myopts) and not ("--fetchonly" in myopts or "--fetch-all-uri" in myopts):
- print "\n\nRoot nodes:"
- graph = mydepgraph.mynewgraph
- nodes = graph.get_root_nodes()
- nodes.sort()
- for node in nodes:
- print " ",node
- print "\n\nLeaf nodes:"
- graph = mydepgraph.mynewgraph
- nodes = graph.get_leaf_nodes()
- nodes.sort()
- for node in nodes:
- print " ",node
if ("--resume" in myopts):
mydepgraph.display(portage.mtimedb["resume"]["mergelist"])
else: