summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-01-05 19:51:58 -0800
committerZac Medico <zmedico@gentoo.org>2011-01-05 19:51:58 -0800
commit0414c2c1318f615e22939aba914b81379ff366a1 (patch)
treeee8188992b72a71f634cbce89f9438f2f3db8ad8 /pym
parent52ca75a1ae2774dbdbe61a1b38cff4fafa6a4af7 (diff)
downloadportage-0414c2c1318f615e22939aba914b81379ff366a1.tar.gz
portage-0414c2c1318f615e22939aba914b81379ff366a1.tar.bz2
portage-0414c2c1318f615e22939aba914b81379ff366a1.zip
Scheduler: fix reposyntax uninstall hash breakage
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/Scheduler.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py
index f237a0205..312a7a30e 100644
--- a/pym/_emerge/Scheduler.py
+++ b/pym/_emerge/Scheduler.py
@@ -1410,9 +1410,7 @@ class Scheduler(PollScheduler):
if pkg_to_replace is not None:
# When a package is replaced, mark it's uninstall
# task complete (if any).
- uninst_hash_key = \
- ("installed", pkg.root, pkg_to_replace.cpv, "uninstall")
- self._task_complete(uninst_hash_key)
+ self._task_complete(pkg_to_replace)
if pkg.installed:
return
@@ -1752,7 +1750,8 @@ class Scheduler(PollScheduler):
if previous_cpv:
previous_cpv = previous_cpv.pop()
pkg_to_replace = self._pkg(previous_cpv,
- "installed", pkg.root_config, installed=True)
+ "installed", pkg.root_config, installed=True,
+ operation="uninstall")
task = MergeListItem(args_set=self._args_set,
background=self._background, binpkg_opts=self._binpkg_opts,
@@ -1983,7 +1982,8 @@ class Scheduler(PollScheduler):
if world_locked:
world_set.unlock()
- def _pkg(self, cpv, type_name, root_config, installed=False, myrepo=None):
+ def _pkg(self, cpv, type_name, root_config, installed=False,
+ operation=None, myrepo=None):
"""
Get a package instance from the cache, or create a new
one if necessary. Raises KeyError from aux_get if it
@@ -2003,9 +2003,11 @@ class Scheduler(PollScheduler):
else:
repo_key = myrepo
- operation = "merge"
- if installed:
- operation = "nomerge"
+ if operation is None:
+ if installed:
+ operation = "nomerge"
+ else:
+ operation = "merge"
# Reuse existing instance when available.
pkg = self._pkg_cache.get(