summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-08-16 06:34:33 +0000
committerZac Medico <zmedico@gentoo.org>2007-08-16 06:34:33 +0000
commit0a55db32f254133a273e890b7131d5b3b845ff15 (patch)
treeb6a8dbca0150c5737e3d8f4d12a465d8818e7f8b
parent053c42e5640163825ac3101d649ac7c0a27301b0 (diff)
downloadportage-0a55db32f254133a273e890b7131d5b3b845ff15.tar.gz
portage-0a55db32f254133a273e890b7131d5b3b845ff15.tar.bz2
portage-0a55db32f254133a273e890b7131d5b3b845ff15.zip
Fix existing_node logic inside depgraph.create().
svn path=/main/trunk/; revision=7628
-rw-r--r--pym/emerge/__init__.py35
1 files changed, 15 insertions, 20 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py
index 1e88eb7b0..53a7a99c9 100644
--- a/pym/emerge/__init__.py
+++ b/pym/emerge/__init__.py
@@ -1211,10 +1211,6 @@ class depgraph(object):
return 0
del e
- existing_node = None
- if addme:
- existing_node = self.pkg_node_map[myroot].get(mykey)
-
if "--nodeps" not in self.myopts:
self.spinner.update()
@@ -1266,6 +1262,19 @@ class depgraph(object):
mydbapi.aux_get(mykey, self._mydbapi_keys)))
myuse = metadata["USE"].split()
slot_atom = "%s:%s" % (portage.dep_getkey(mykey), metadata["SLOT"])
+ if merging and \
+ "empty" not in self.myparams and \
+ vardbapi.match(slot_atom):
+ # Increase the priority of dependencies on packages that
+ # are being rebuilt. This optimizes merge order so that
+ # dependencies are rebuilt/updated as soon as possible,
+ # which is needed especially when emerge is called by
+ # revdep-rebuild since dependencies may be affected by ABI
+ # breakage that has rendered them useless. Don't adjust
+ # priority here when in "empty" mode since all packages
+ # are being merged in that case.
+ priority.rebuild = True
+
existing_node = self._slot_node_map[myroot].get(
slot_atom, None)
slot_collision = False
@@ -1282,6 +1291,8 @@ class depgraph(object):
priority=priority)
return 1
else:
+ if jbigkey in self._slot_collision_nodes:
+ return 1
# A slot collision has occurred. Sometimes this coincides
# with unresolvable blockers, so the slot collision will be
# shown later if there are no unresolvable blockers.
@@ -1314,19 +1325,6 @@ class depgraph(object):
if reinstall_for_flags:
self._reinstall_nodes[jbigkey] = reinstall_for_flags
- if merging and \
- "empty" not in self.myparams and \
- vardbapi.match(slot_atom):
- # Increase the priority of dependencies on packages that
- # are being rebuilt. This optimizes merge order so that
- # dependencies are rebuilt/updated as soon as possible,
- # which is needed especially when emerge is called by
- # revdep-rebuild since dependencies may be affected by ABI
- # breakage that has rendered them useless. Don't adjust
- # priority here when in "empty" mode since all packages
- # are being merged in that case.
- priority.rebuild = True
-
if rev_dep and myparent:
self.digraph.addnode(myparent, jbigkey,
priority=priority)
@@ -1354,9 +1352,6 @@ 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. """