diff options
| author | fuzzyray <fuzzyray@gentoo.org> | 2007-01-24 18:27:10 +0000 |
|---|---|---|
| committer | fuzzyray <fuzzyray@gentoo.org> | 2007-01-24 18:27:10 +0000 |
| commit | 0b647f4e1074647605d661f5ed9f7d65fa8e3766 (patch) | |
| tree | 0c5899206c1441c8b12c22790243188a258f65dd /trunk/src | |
| parent | 1f115e0d7054285969f765941d1a07a98317d186 (diff) | |
| download | gentoolkit-0b647f4e1074647605d661f5ed9f7d65fa8e3766.tar.gz | |
Simplify find_best_match(), since it was causing Bug #161995, and portage now handles virtuals fairly well
svn path=/; revision=340
Diffstat (limited to 'trunk/src')
| -rw-r--r-- | trunk/src/gentoolkit/helpers.py | 9 |
1 files 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 |
