Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Zac Medico (zmedico)" <zmedico@g.o>
Subject: portage r12494 - main/trunk/pym/_emerge
Date: Tue, 13 Jan 2009 04:43:41 +0000
Author: zmedico
Date: 2009-01-13 04:43:40 +0000 (Tue, 13 Jan 2009)
New Revision: 12494

Modified:
   main/trunk/pym/_emerge/__init__.py
Log:
Simplify depgraph._select_pkg_from_graph() by using match_pkgs().


Modified: main/trunk/pym/_emerge/__init__.py
===================================================================
--- main/trunk/pym/_emerge/__init__.py	2009-01-12 19:57:26 UTC (rev 12493)
+++ main/trunk/pym/_emerge/__init__.py	2009-01-13 04:43:40 UTC (rev 12494)
@@ -6234,19 +6234,12 @@
 		replacement.
 		"""
 		graph_db = self._graph_trees[root]["porttree"].dbapi
-		matches = graph_db.match(atom)
+		matches = graph_db.match_pkgs(atom)
 		if not matches:
 			return None, None
-		cpv = matches[-1] # highest match
-		slot_atom = "%s:%s" % (portage.cpv_getkey(cpv),
-			graph_db.aux_get(cpv, ["SLOT"])[0])
-		e_pkg = self._slot_pkg_map[root].get(slot_atom)
-		if e_pkg:
-			return e_pkg, e_pkg
-		# Since this cpv exists in the graph_db,
-		# we must have a cached Package instance.
-		cache_key = ("installed", root, cpv, "nomerge")
-		return (self._pkg_cache[cache_key], None)
+		pkg = matches[-1] # highest match
+		in_graph = self._slot_pkg_map[root].get(pkg.slot_atom)
+		return pkg, in_graph
 
 	def _complete_graph(self):
 		"""



Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
gentoo-x86 commit in games-emulation/yabause: ChangeLog yabause-0.9.9.ebuild yabause-0.9.7.ebuild yabause-0.9.8.ebuild
Next by thread:
gentoo-x86 commit in games-rpg/daimonin-client: ChangeLog daimonin-client-0.9.7.1.ebuild
Previous by date:
gentoo-x86 commit in games-emulation/yabause: ChangeLog yabause-0.9.9.ebuild yabause-0.9.7.ebuild yabause-0.9.8.ebuild
Next by date:
gentoo-x86 commit in games-rpg/daimonin-client: ChangeLog daimonin-client-0.9.7.1.ebuild


Updated Feb 17, 2011

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.