From: fuzzyray Date: Wed, 24 Jan 2007 18:27:10 +0000 (-0000) Subject: Simplify find_best_match(), since it was causing Bug #161995, and portage now handles... X-Git-Tag: gentoolkit-0.2.4.3~173 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0b647f4e1074647605d661f5ed9f7d65fa8e3766;p=gentoolkit.git Simplify find_best_match(), since it was causing Bug #161995, and portage now handles virtuals fairly well svn path=/; revision=340 --- diff --git a/trunk/src/gentoolkit/helpers.py b/trunk/src/gentoolkit/helpers.py index 3fa32d1..97c7bc6 100644 --- a/trunk/src/gentoolkit/helpers.py +++ b/trunk/src/gentoolkit/helpers.py @@ -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