public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r10745 - main/trunk/pym/portage
@ 2008-06-20 17:36 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-06-20 17:36 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2008-06-20 17:36:18 +0000 (Fri, 20 Jun 2008)
New Revision: 10745

Modified:
   main/trunk/pym/portage/dep.py
Log:
Make isvalidatom() use the Atom cache to avoid validating the same atom
twice.


Modified: main/trunk/pym/portage/dep.py
===================================================================
--- main/trunk/pym/portage/dep.py	2008-06-20 17:04:13 UTC (rev 10744)
+++ main/trunk/pym/portage/dep.py	2008-06-20 17:36:18 UTC (rev 10745)
@@ -611,6 +611,9 @@
 		1) 0 if the atom is invalid
 		2) 1 if the atom is valid
 	"""
+	existing_atom = Atom._atoms.get(atom)
+	if existing_atom is not None:
+		atom = existing_atom
 	if isinstance(atom, Atom):
 		if atom.blocker and not allow_blockers:
 			return 0

-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-06-20 17:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-20 17:36 [gentoo-commits] portage r10745 - main/trunk/pym/portage 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