From 98081528e5d412b6c8aaf5083c58ef816542907f Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 30 May 2008 06:50:34 +0000 Subject: [PATCH] Make PackageSet.findAtomForPackage() just return the first atom found since best_match_to_list() won't work correctly for atoms matched via PROVIDE. svn path=/main/trunk/; revision=10501 --- pym/portage/sets/base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pym/portage/sets/base.py b/pym/portage/sets/base.py index 3f85965bc..2ae4723fb 100644 --- a/pym/portage/sets/base.py +++ b/pym/portage/sets/base.py @@ -105,10 +105,10 @@ class PackageSet(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 best_match_to_list(pkg, atoms) def iterAtomsForPackage(self, pkg): """ -- 2.26.2