summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-05-30 06:56:40 +0000
committerZac Medico <zmedico@gentoo.org>2008-05-30 06:56:40 +0000
commit3f24a244cb307966ac65ce6028c862f6435c9f1e (patch)
treec8ee613b9ff6563405483ce5c749f3eb87fbb124
parent86e90c4c2a2290ad12a0733eb5f42e46cfc63e14 (diff)
downloadportage-3f24a244cb307966ac65ce6028c862f6435c9f1e.tar.gz
portage-3f24a244cb307966ac65ce6028c862f6435c9f1e.tar.bz2
portage-3f24a244cb307966ac65ce6028c862f6435c9f1e.zip
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
-rwxr-xr-xbin/emerge6
1 files changed, 3 insertions, 3 deletions
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):
"""