diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-08-16 05:53:51 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-08-16 05:53:51 +0000 |
commit | 053c42e5640163825ac3101d649ac7c0a27301b0 (patch) | |
tree | 4f08f10151731c794d545ad3c5c6a37c4fbbed2b | |
parent | 78ecf2c63ff89df9a8959df822765b5eb12ea872 (diff) | |
download | portage-053c42e5640163825ac3101d649ac7c0a27301b0.tar.gz portage-053c42e5640163825ac3101d649ac7c0a27301b0.tar.bz2 portage-053c42e5640163825ac3101d649ac7c0a27301b0.zip |
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
-rw-r--r-- | pym/emerge/__init__.py | 33 |
1 files changed, 14 insertions, 19 deletions
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. """ |