Since this implementation is only intended to check for existence of
new-style virtuals, it's a waste of time to return more than one cpv.
def cp_list(self, cp):
"""
Emulate cp_list just so it can be used to check for existence
- of new-style virtuals.
+ of new-style virtuals. Since it's a waste of time to return
+ more than one cpv for this use case, a maximum of one cpv will
+ be returned.
"""
if isinstance(cp, Atom):
atom = cp
self._depgraph._frozen_config.roots[self._root], atom):
if pkg.cp == cp:
ret.append(pkg.cpv)
+ break
return ret