summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/__init__.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 5b220c4b2..8e2df4d58 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -10345,6 +10345,13 @@ class Scheduler(PollScheduler):
if installed:
operation = "nomerge"
+ if self._digraph is not None:
+ # Reuse existing instance when available.
+ pkg = self._digraph.get(
+ (type_name, root_config.root, cpv, operation))
+ if pkg is not None:
+ return pkg
+
tree_type = depgraph.pkg_tree_map[type_name]
db = root_config.trees[tree_type].dbapi
db_keys = list(self.trees[root_config.root][
@@ -10357,10 +10364,6 @@ class Scheduler(PollScheduler):
settings.setcpv(pkg)
pkg.metadata["USE"] = settings["PORTAGE_USE"]
- if self._digraph is not None:
- # Reuse existing instance when available.
- pkg = self._digraph.get(pkg, pkg)
-
return pkg
class MetadataRegen(PollScheduler):