From 39b38469dcf3a00623a2597db171b42bb98cc069 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 20 Jun 2008 17:36:18 +0000 Subject: Make isvalidatom() use the Atom cache to avoid validating the same atom twice. svn path=/main/trunk/; revision=10745 --- pym/portage/dep.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pym') diff --git a/pym/portage/dep.py b/pym/portage/dep.py index 8a8958788..43e34cdb7 100644 --- a/pym/portage/dep.py +++ b/pym/portage/dep.py @@ -611,6 +611,9 @@ def isvalidatom(atom, allow_blockers=False): 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 -- cgit v1.2.3-1-g7c22