--- gentoolkit-0.3.0_rc9/pym/gentoolkit/equery/which.py +++ gentoolkit-0.3.0_rc9/pym/gentoolkit/equery/which.py @@ -86,7 +86,7 @@ for query in queries: - matches = find_packages(query, QUERY_OPTS['includeMasked']) + matches = find_packages(query, QUERY_OPTS['includeMasked'], False) if matches: pkg = sorted(matches).pop() ebuild_path = pkg.ebuild_path() --- gentoolkit-0.3.0_rc9/pym/gentoolkit/helpers.py +++ gentoolkit-0.3.0_rc9/pym/gentoolkit/helpers.py @@ -521,7 +521,7 @@ return [Package(x) for x in matches] -def find_packages(query, include_masked=False): +def find_packages(query, include_masked=False, include_installed=True): """Returns a list of Package objects that matched the query. @type query: str @@ -542,7 +542,8 @@ matches = PORTDB.xmatch("match-all", query) else: matches = PORTDB.match(query) - matches.extend(VARDB.match(query)) + if include_installed: + matches.extend(VARDB.match(query)) except portage.exception.InvalidAtom, err: raise errors.GentoolkitInvalidAtom(str(err))