From: Zac Medico Date: Fri, 30 May 2008 06:56:40 +0000 (-0000) Subject: Make PackageSet.findAtomForPackage() just return the first atom found X-Git-Tag: v2.1.5.3~17 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3f24a244cb307966ac65ce6028c862f6435c9f1e;p=portage.git Make PackageSet.findAtomForPackage() just return the first atom found 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 --- diff --git a/bin/emerge b/bin/emerge index a232565c5..d4321c282 100755 --- a/bin/emerge +++ b/bin/emerge @@ -818,10 +818,10 @@ class InternalPackageSet(object): 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): """