summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-08-25 23:02:53 +0000
committerZac Medico <zmedico@gentoo.org>2007-08-25 23:02:53 +0000
commit41b2ed875e55c9b3ee4afc8b2ec1a35f4edf823b (patch)
tree3a4d421889883a9ab9eb046c2fdf8ef7f7fdebd5
parent3beeb0307aaaf083aba55898b36d1b0ce22277e3 (diff)
downloadportage-41b2ed875e55c9b3ee4afc8b2ec1a35f4edf823b.tar.gz
portage-41b2ed875e55c9b3ee4afc8b2ec1a35f4edf823b.tar.bz2
portage-41b2ed875e55c9b3ee4afc8b2ec1a35f4edf823b.zip
Move blocker handling from depgraph.create() to select_dep().
svn path=/main/trunk/; revision=7701
-rw-r--r--pym/emerge/__init__.py23
1 files changed, 11 insertions, 12 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py
index e2149c0c7..8354da39f 100644
--- a/pym/emerge/__init__.py
+++ b/pym/emerge/__init__.py
@@ -1169,16 +1169,6 @@ class depgraph(object):
mytype, myroot, mykey = mybigkey
- if mytype == "blocks":
- if myparent and \
- "--buildpkgonly" not in self.myopts and \
- "--nodeps" not in self.myopts and \
- myparent not in self._slot_collision_nodes:
- mybigkey[1] = myparent[1]
- self.blocker_parents.setdefault(
- tuple(mybigkey), set()).add(myparent)
- return 1
-
# select the correct /var database that we'll be checking against
vardbapi = self.trees[myroot]["vartree"].dbapi
portdb = self.trees[myroot]["porttree"].dbapi
@@ -1724,8 +1714,17 @@ class depgraph(object):
print "Candidates:",mymerge
for x in mymerge:
selected_pkg = None
- if x[0]=="!":
- selected_pkg = (["blocks", myroot, x[1:]], None)
+ if x.startswith("!"):
+ if "--buildpkgonly" not in self.myopts and \
+ "--nodeps" not in self.myopts and \
+ myparent not in self._slot_collision_nodes:
+ p_type, p_root, p_key, p_status = myparent
+ if p_type != "installed" and p_status != "merge":
+ # It's safe to ignore blockers from --onlydeps nodes.
+ continue
+ self.blocker_parents.setdefault(
+ ("blocks", p_root, x[1:]), set()).add(myparent)
+ continue
else:
#We are not processing a blocker but a normal dependency
if myparent: