Simplify find_best_match(), since it was causing Bug #161995, and portage now handles...
authorfuzzyray <fuzzyray@gentoo.org>
Wed, 24 Jan 2007 18:27:10 +0000 (18:27 -0000)
committerfuzzyray <fuzzyray@gentoo.org>
Wed, 24 Jan 2007 18:27:10 +0000 (18:27 -0000)
svn path=/; revision=340

trunk/src/gentoolkit/helpers.py

index 3fa32d1d0a4c1a15c5bc797a08e702b62723f4b7..97c7bc6c3810d6c5a989ade59ce797f094500ff4 100644 (file)
@@ -55,13 +55,8 @@ def find_installed_packages(search_key, masked=False):
 
 def find_best_match(search_key):
        """Returns a Package object for the best available installed candidate that
-       matched the search key. Doesn't handle virtuals perfectly"""
-       # FIXME: How should we handled versioned virtuals??
-       cat,pkg,ver,rev = split_package_name(search_key)
-       if cat == "virtual":
-               t = portage.db["/"]["vartree"].dep_bestmatch(cat+"/"+pkg)
-       else:
-               t = portage.db["/"]["vartree"].dep_bestmatch(search_key)
+       matched the search key."""
+       t = portage.db["/"]["vartree"].dep_bestmatch(search_key)
        if t:
                return Package(t)
        return None