From: fuzzyray Date: Wed, 3 Sep 2008 20:31:31 +0000 (-0000) Subject: Merge changes from trunk to fix issues in 0.2.4 X-Git-Tag: gentoolkit-0.2.4.3~2 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=9abc4714ac9e981a242460fa003c405ee0dc58fc;p=gentoolkit.git Merge changes from trunk to fix issues in 0.2.4 svn path=/branches/gentoolkit-0.2.4/; revision=514 --- diff --git a/ChangeLog b/ChangeLog index b100110..aa1c6e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-09-03: Paul Varner + * equery: Fix depgraph function to print out dependencies that don't + resolve to a package (Bug #236492) + 2008-08-26: Paul Varner * glsa-check: Fix has_key() deprecation message. (Bug #232797) * revdep-rebuild: Update fix for Bug 232270 to utilize better patch diff --git a/src/equery/equery b/src/equery/equery index 63eb8b3..d5b5945 100755 --- a/src/equery/equery +++ b/src/equery/equery @@ -375,7 +375,6 @@ class CmdListBelongs(Command): query[i] = query[i].rstrip('/') q = map(lambda x: ((len(x) and x[0] == "/") and "^" or "/") + re.escape(x) + "$", query) - print q try: q = "|".join(q) rx = re.compile(q) @@ -738,6 +737,7 @@ class CmdDisplayDepGraph(Command): cpv = x[2] pkg = gentoolkit.find_best_match(x[0] + cpv) if not pkg: + print pfx + x[0] + cpv + " (unable to resolve to a package / package masked or removed)" continue if pkg.get_cpv() in pkgtbl: continue diff --git a/src/gentoolkit/helpers.py b/src/gentoolkit/helpers.py index bf2b1b1..1823f2c 100644 --- a/src/gentoolkit/helpers.py +++ b/src/gentoolkit/helpers.py @@ -64,9 +64,9 @@ def find_installed_packages(search_key, masked=False): return [Package(x) for x in t] def find_best_match(search_key): - """Returns a Package object for the best available installed candidate that + """Returns a Package object for the best available candidate that matched the search key.""" - t = portage.db["/"]["vartree"].dep_bestmatch(search_key) + t = portage.db["/"]["porttree"].dep_bestmatch(search_key) if t: return Package(t) return None