From: Zac Medico Date: Fri, 20 Jun 2008 17:36:18 +0000 (-0000) Subject: Make isvalidatom() use the Atom cache to avoid validating the same atom X-Git-Tag: v2.2_rc2~369 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=39b38469dcf3a00623a2597db171b42bb98cc069;p=portage.git Make isvalidatom() use the Atom cache to avoid validating the same atom twice. svn path=/main/trunk/; revision=10745 --- 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