public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [gentoo-commits] portage r11752 - main/trunk/pym/_emerge
@ 2008-10-30 20:20 99% Zac Medico (zmedico)
  0 siblings, 0 replies; 1+ results
From: Zac Medico (zmedico) @ 2008-10-30 20:20 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2008-10-30 20:20:38 +0000 (Thu, 30 Oct 2008)
New Revision: 11752

Modified:
   main/trunk/pym/_emerge/__init__.py
Log:
Avoid unnecessary aux_get calls inside Scheduler._pkg() by getting the existing
Package instance from the digraph.


Modified: main/trunk/pym/_emerge/__init__.py
===================================================================
--- main/trunk/pym/_emerge/__init__.py	2008-10-30 19:54:19 UTC (rev 11751)
+++ main/trunk/pym/_emerge/__init__.py	2008-10-30 20:20:38 UTC (rev 11752)
@@ -10345,6 +10345,13 @@
 		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 @@
 			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):




^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2008-10-30 20:20 99% [gentoo-commits] portage r11752 - main/trunk/pym/_emerge Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox