since best_match_to_list() won't work correctly for atoms matched
via PROVIDE. (trunk r10501)
svn path=/main/branches/2.1.2/; revision=10502
None if there are no matches. This matches virtual arguments against
the PROVIDE metadata. This can raise an InvalidDependString exception
if an error occurs while parsing PROVIDE."""
- atoms = list(self.iterAtomsForPackage(pkg))
- if not atoms:
+ try:
+ return self.iterAtomsForPackage(pkg).next()
+ except StopIteration:
return None
- return portage.best_match_to_list(pkg, atoms)
def iterAtomsForPackage(self, pkg):
"""