diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-06-20 17:36:18 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-06-20 17:36:18 +0000 |
commit | 39b38469dcf3a00623a2597db171b42bb98cc069 (patch) | |
tree | d121c1bfcfbde8fc2563ad03050183f548ca55cd | |
parent | 46229c938cc8b580d46674d2b83d713f95c28003 (diff) | |
download | portage-39b38469dcf3a00623a2597db171b42bb98cc069.tar.gz portage-39b38469dcf3a00623a2597db171b42bb98cc069.tar.bz2 portage-39b38469dcf3a00623a2597db171b42bb98cc069.zip |
Make isvalidatom() use the Atom cache to avoid validating the same atom
twice.
svn path=/main/trunk/; revision=10745
-rw-r--r-- | pym/portage/dep.py | 3 |
1 files changed, 3 insertions, 0 deletions
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 |