From 0b647f4e1074647605d661f5ed9f7d65fa8e3766 Mon Sep 17 00:00:00 2001 From: fuzzyray Date: Wed, 24 Jan 2007 18:27:10 +0000 Subject: [PATCH] Simplify find_best_match(), since it was causing Bug #161995, and portage now handles virtuals fairly well svn path=/; revision=340 --- trunk/src/gentoolkit/helpers.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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 -- 2.26.2