From: Zac Medico Date: Thu, 16 Aug 2007 05:53:51 +0000 (-0000) Subject: Combine 2 locations in depgraph.create() where nodes are added to the digraph. This... X-Git-Tag: v2.2_pre1~880 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=053c42e5640163825ac3101d649ac7c0a27301b0;p=portage.git Combine 2 locations in depgraph.create() where nodes are added to the digraph. This ensures that dependencies on "rebuild" nodes always have their priority increased. svn path=/main/trunk/; revision=7627 --- diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index aa38cfd27..1e88eb7b0 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -1163,6 +1163,11 @@ class depgraph(object): #IUSE-aware emerge -> USE DEP aware depgraph #"no downgrade" emerge """ + + # unused parameters + rev_dep = False + myuse = None + mytype, myroot, mykey = mybigkey if mytype == "blocks": @@ -1209,19 +1214,7 @@ class depgraph(object): existing_node = None if addme: existing_node = self.pkg_node_map[myroot].get(mykey) - if existing_node: - self._parent_child_digraph.add(existing_node, myparent) - if existing_node != myparent: - # Refuse to make a node depend on itself so that the we don't - # don't create a bogus circular dependency in self.altlist(). - if rev_dep and myparent: - self.digraph.addnode(myparent, existing_node, - priority=priority) - else: - self.digraph.addnode(existing_node, myparent, - priority=priority) - return 1 - + if "--nodeps" not in self.myopts: self.spinner.update() @@ -1280,12 +1273,11 @@ class depgraph(object): e_type, myroot, e_cpv, e_status = existing_node if mykey == e_cpv: # The existing node can be reused. - self._parent_child_digraph.add(existing_node, myparent) - if rev_dep and myparent: - ptype, proot, pkey, pstatus = myparent - self.digraph.addnode(myparent, existing_node, - priority=priority) - else: + if existing_node != myparent: + # Refuse to make a node depend on itself so that + # we don't create a bogus circular dependency + # in self.altlist(). + self._parent_child_digraph.add(existing_node, myparent) self.digraph.addnode(existing_node, myparent, priority=priority) return 1 @@ -1362,6 +1354,9 @@ class depgraph(object): elif "recurse" not in self.myparams: return 1 + if existing_node: + return 1 + """ Check DEPEND/RDEPEND/PDEPEND/SLOT Pull from bintree if it's binary package, porttree if it's ebuild. Binpkg's can be either remote or local. """