summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-27 16:55:53 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-27 16:55:53 -0700
commit35be6eb927cde7b18e3c4c5700feef937e08b1ed (patch)
tree0548b372680bd1cdd7f88e90070c460c369f3e07
parent575269bb0d3a30aefd355dd7d4b8c8fbeaeea893 (diff)
downloadportage-35be6eb927cde7b18e3c4c5700feef937e08b1ed.tar.gz
portage-35be6eb927cde7b18e3c4c5700feef937e08b1ed.tar.bz2
portage-35be6eb927cde7b18e3c4c5700feef937e08b1ed.zip
Fix breakage in depgraph._serialize_tasks() blocker handling due
to addition of repo to Package._hash_key.
-rw-r--r--pym/_emerge/depgraph.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 33dbecfb9..fc96bdd3f 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -4350,13 +4350,17 @@ class depgraph(object):
uninst_task = node
else:
vardb = self._frozen_config.trees[node.root]["vartree"].dbapi
- previous_cpv = vardb.match(node.slot_atom)
- if previous_cpv:
+ inst_pkg = vardb.match_pkgs(node.slot_atom)
+ if inst_pkg:
# The package will be replaced by this one, so remove
# the corresponding Uninstall task if necessary.
- previous_cpv = previous_cpv[0]
- uninst_task = \
- ("installed", node.root, previous_cpv, "uninstall")
+ inst_pkg = inst_pkg[0]
+ uninst_task = Package(built=inst_pkg.built,
+ cpv=inst_pkg.cpv, installed=inst_pkg.installed,
+ metadata=inst_pkg.metadata,
+ operation="uninstall",
+ root_config=inst_pkg.root_config,
+ type_name=inst_pkg.type_name)
try:
mygraph.remove(uninst_task)
except KeyError: